Dhir was also backed by the lone Janata Dal - United Member of Legislative Assembly and an Independent.
As many as 37 MLAs supported Dhir while Bharatiya Janata Party candidate Jagdish Mukhi got the support of 32 MLAs from his party.
Immediately after his election to the post, Chief Minister Arvind Kejriwal and BJP leader Harsh Vardhan greeted Dhir and wished him good luck.
"I congratulate you from the core of my heart and hope that you will keep the prestige and the tradition of the assembly intact," said Vardhan.
The pro-tem speaker conducted a voice vote twice following objections by BJP MLAs.
The minority Aam Aadmi Party government had on Wednesday crossed the first hurdle in the Delhi Assembly when its confidence motion sailed through easily with the backing of the members of the Congress, the JD-U and an independent.
Arvind Kejriwal's AAP wins trust vote
The Yogi arrives: A warning for Narendra Modi
PHOTOS: Arvind Kejriwal, the UNCOMMON chief minister
'Now, 1.5 crore people of Delhi will run the govt'
The PM breaks his silence: Were you convinced?