Petrol prices rose by an average of 7p a litre in August - as families headed out on the roads for summer holiday activities.
The surge was the fifth biggest monthly increase in 23 years, the RAC said.
Diesel also soared by 8p a litre - the sixth-largest monthly increase over the same period.
Petrol ended the month at an average of 152.25p, up from 145.57p at the start of August, while diesel went up from 146.36p to 154.37p.
It means it cost about £4 more to fill a tank with fuel in August than it did in July.
Why are petrol and diesel prices rising?
The price of petrol and diesel is rising at the pumps because the cost of oil has risen sharply.
Due to the producing group Opec+ reducing supply, the price of oil has risen by $12 a barrel since the start of July, to nearly $87 a barrel.
Opec+ is a group of 23 oil-producing countries that produce more than 80% of the world's crude. It's led by Saudi Arabia and Russia is also among its members. It can cut supply to inflate prices and although the UK does not tolerate price fixing, it is at the whim of its suppliers.
UK fuel prices are usually affected a few weeks after an oil price fluctuation.
The latest oil production shortage has caused the wholesale cost of fuel - which is what retailers pay – to go up.
RAC fuel spokesman Simon Williams said: "August was a big shock to drivers as they had grown used to seeing far lower prices than last summer's record highs.
"Seeing £4 or more go on to the cost of a tank in the space of just a few weeks from a pump price rise of 6-7p a litre is galling, particularly for those who drive lots of miles or run an older, less fuel-efficient car."
Supermarket petrol station profit margins
Price rises could have been worse if the supply shortage had occurred earlier in the year when large retailers were making a higher profit margin on fuel, the RAC said.
It previously revealed supermarkets had increased their profit margins from 2p per litre in 2016 to 10p a litre since the Ukraine war.
Tesco, Asda, Sainsbury's and Morrisons had margins on petrol at almost 11p a litre in 2022, but this has now dropped to 6p a litre, Sky News reported.
Meanwhile in July supermarkets were making 15p per litre of diesel sold as wholesale prices had fallen.
Last month Asda vowed to display its fuel prices online after the Competition and Markets Authority revealed its margins had risen by 6p a litre between 2019 and 2022.
Mr Williams added: "While the increase is clearly bad news for drivers, it could have been far worse had the biggest retailers not let their inflated margins from earlier in the year return to more normal levels as wholesale fuel costs went up.
"All we can hope is that this move by many big retailers back to fairer forecourt pricing remains when wholesale costs go down again. Only time will tell."