Under the law, distributors including subsidiaries of BP, Exxon Mobil and Chevron will have 60 days to negotiate the sale of their businesses to the government or face expropriation.
Venezuela's state energy firm will now control almost all elements of the country's lucrative oil industry.
Exploration and refining operations are already carried out by the public sector, with some private firms granted a limited role.
The National Assembly, which is controlled by allies of progressive President Hugo Chavez, approved the legislation with a near unanimous vote.
Seven MPs belonging to Podemos, the only opposition party represented in the 167-seat assembly, voted against the Bill.
The law permits Venezuela's state-run oil company PDVSA to take over all wholesale fuel distribution but allows 67 per cent of the country's petrol stations to be privately owned.
It also forces wholesale distributors to sell storage tanks and petrol pumps to PDVSA.
Pro-Chavez MP Angel Rodriguez reported that PDVSA plans to spend £185 million to acquire 1,200 petrol tankers currently owned by private wholesalers.
Local wholesalers Trebol and Llano Petrol together control 26 per cent of the market.
BP controls 7 per cent, while Exxon and Chevron control 5 per cent and 3 per cent respectively.
The remaining 10 per cent is controlled by smaller Venezuelan companies.
Trebol vice-president Orlando Gonzalez said that wholesale fuel distributors would co-operate with Mr Chavez's administration as the state takeover proceeds, explaining that they hope to remain in business.
Right-wing critics predict that the takeover of fuel distribution will cause shortages at petrol stations, arguing that privateers are more efficient than the public sector.
But Mr Chavez has defended the law, accusing operators of making an easy buck at the country's expense.
And Caracas has promised an improved service, guaranteeing regular deliveries to the most remote corners of Venezuela.
The government also predicts that bringing fuel distribution under state control will help to foil criminals who regularly smuggle fuel across the border to Colombia and Brazil.
Venezuela's socialist government has already nationalised Venezuela's largest telephone, electricity, steel and cement companies and has assumed majority control over four major oil projects.