Kanwar Mohammad Dilshad, the secretary of Pakistan's Election Commission, said, the two parties "emerged as the main winners."
He said turnout was low but he did not have exact figures.
The two parties also won 19 out of 28 provincial seats that were available, he said.
The remaining provincial assembly seats were won by a smaller regional party and independent candidates.
During voting several people were injured after clashes erupted between rival political activists in three constituencies.
Polling was postponed for a sixth parliamentary seat in the eastern city of Lahore because of legal disputes over whether Sharif was eligible to contest.
A Lahore court ruled on Monday that he was ineligible to stand due to an old criminal conviction that Sharif says is politically motivated.
The results do not affect the balance of power in the 342-member National Assembly, where the People's Party controls 125 seats and Sharif's party holds 95 seats.
The former ruling party that backs Pervez Musharraf, the Pakistani president, came third with 54 seats.