"An 18-year-old Muhammad Shahid was also evacuated alive 50 hours after the building collapsed by the blessing of God," Muhammad Usman, a top administration official in Lahore, told AFP.The four-storey Rajput Polyester polythene bag factory came crashing down on Wednesday evening, and at least 37 bodies have so far been recovered from the wreckage.
Shahid's discovery ignited emotional scenes at the site as workers chanted "Allah-O-Akbar (God is great)" and encouraged each other to boost morale.
The news was a welcome surprise to his family who had mistakenly identified the dead body of another boy earlier this week as Shahid and buried the remains in their ancestral town of Kabirwala, some 265 kilometres (164 miles) from Lahore.
Officials have said at least 150 people were in the factory when it came down and it was unclear how many, dead or alive, may still be trapped.
Punjab chief minister Shahbaz Sharif has said the factory may have suffered structural damage in the October 26 quake, which killed almost 400 people across Pakistan and Afghanistan.
Provincial labour minister Raja Ashfaq Sarwar said that an enquiry into the collapse "is being conducted and we will probe all angles", with a report to be submitted within two weeks.
At least 24 people died last year when a mosque collapsed in the same city, while more than 200 people lost their lives, mostly due to collapsed roofs, following torrential rain and flooding in 2014.