There were no injuries and only minor damage at the stations, which were evacuated before the blasts, an Interior Ministry official said.
Earlier, the Basque newspaper Gara said it had received a call from a person claiming to speak on behalf of ETA who said five explosive devices had been placed at gas stations along major highways leading out of Madrid. Gara often serves as a mouthpiece for ETA statements.
Friday night marked the start of a long holiday weekend in Spain and the highways where those gas stations are located had been bumper-to-bumper with traffic.
ETA has been blamed for more than 800 deaths since the late 1960s. It staged a string of small explosions in resort towns in northern Spain over the summer, causing slight damage and only a few minor injuries.
Its last fatal attack was in May 2003 — a car bombing that killed two policemen in the northern town of Sanguesa.
Last month, a banned party seen as ETA's political wing proposed a new formula for peace talks with the government, raising hopes that ETA might be prepared to end its armed struggle.
But days later, ETA issued a statement pledging to continue attacks against Spanish security forces.