The Upper Dales Community Partnership has been granted a three-year lease on the Dale Head Garage in Hawes, Yorkshire.
It will take on the lease from 1 November.
The partnership is already an important rural service provider, running a local post office, bus company and a library.
The next nearest petrol station is 18 miles away – meaning local residents would face a 36-mile round trip to buy fuel if their village forecourt closed.
It hopes to buy the site via a community share offer – similar to the community buy-outs which have seen local residents save rural pubs from closure.
The partnership also intends to install a charging point for electric cars.
Partnership chairman and local councillor John Blackie said: "The petrol station is hugely important to Hawes – it fuels every day life, business and tourism in the area."
"We feared it might fall prey to property developers as so many others have done."
Hawes is one of 17 areas to be part of the government's fuel rebate scheme that allows retailers to claim back 5p per litre duty relief on unleaded petrol and diesel.
The saving is passed on to customers as an incentive to buy fuel locally.
It also helps keep prices competitive in isolated rural areas which are a long way from other forecourts.
Sign up to our newsletter to receive all the latest news and updates.