The vote capped a marathon debate in which the majority rejected a series of objections raised by the left, which was angry that the reform was fast-tracked by skipping committees.
The session took an unusual turn when PRD deputy Antonio Garcia Conejo took to the podium before dawn and removed his socks, suit and tie.
Standing in his black underwear, he said supporters of the reform “stripped down the nation.”
Two other lawmakers, leftist Karen Quiroga and PRI deputy Landy Berzunza, scuffled during the session, leaving Berzunza with a scratched retina.
The vote broke an unprecedented accord between the PRI, PAN and PRD that had led to the passage of political, education, fiscal, telecoms and banking reforms.
“The Pact for Mexico is dead,” PRD president Jesus Zambrano told reporters.
He said his party will send a letter to international oil companies, warning them that the left will demand a referendum in 2015 to repeal the reform.