He was accorded a customary welcome amid chanting of Vedic hymns by the high priests, who escorted him to the sanctum sanctorum along with top temple functionaries from the main entrance.
"Modi also paid his obeisance to the sacred golden altar and the golden holy mast (Dwajastambham) in front of the silver doors inside the temple. He was in the temple for about 20 minutes," said TTD Chairman Chadalawada Krishnamurthy.
PM Modi arrived at the temple by road after inaugurating the annual five day 104th Indian Science Congress at Sri Venkateswara University in Tirupati.
After offering worship, the prime minister was honoured with a sacred silk cloth besides being offered 'Laddu' prasadam at the sprawling Ranga Mandapam in the temple.
The priests also invoked celestial blessings on the prime minister.
Andhra Pradesh Chief Minister N Chandrababu Naidu and Governor E S L Narasimhan accompanied the PM during his six hour visit at Tirupati.
This is Modi's second visit to the temple since he became the prime minister in 2014. He had earlier offered worship at the shrine on October 22 last year.
A thick security blanket is in place over Tirupati and Tirumala in the view of his visit.
WATCH: PM offers prayers at Lord Venkateswara temple
Photographs: Press Information Bureau
PHOTOS: The very best of Obama in 2016
The newsmakers of 2017
The odd, odd world we live in!
Uttam's Take: Modi, Maya, Yadavs in UP's political circus
'UPA government let down the people of J&K'