According to Reuters, who cite the local state news agency, Razak's ruling Barisan Nasional coalition has won 24 parliament seats so far, while the opposition coalition Pakatan Harapan has taken 17.
The ruling Barisan Nasional have held control of the federal government since the country achieved independence in 1957.
Malaysia's former prime minister, Mahathir Mohamad, is heading the opposition campaign, having allied with the imprisoned Anwar Ibrahim.
The latter politician is leading the charge from prison after being thrown into jail for sodomy in 2014 — an incarceration he says was politically motivated.
Under the Malaysian electoral system, voters submit two votes: one for state government and another for the federal government.
In total, 222 parliamentary seats and 505 state assembly seats in 12 states are being voted on by as many as 15 million registered Malaysians.
The opposition has complained that a midweek vote might discourage a high turnout.
The country's election commission said that two hours before voting had closed, 69 percent had cast their vote. At the last election in 2013, the turnout was around 85 percent.
For background and forecasts on the final election result, click here.