Sao Paulo: Felipe Massa was set for a podium finish in his last race with Ferrari until a drive-through penalty cost him track position at the Brazilian Grand Prix.

Massa finished the season-ending race seventh after starting ninth, but he was running fourth when he was penalised for illegally crossing a pit line near the midway point of the race at his home track of Interlagos.

Massa said teammate Fernando Alonso, who was running third and had already secured second in the drivers’ standings, was ready to let him pass for a podium finish in front of the Brazilian crowd.

“I had the pace to stay in fourth place and I certainly had a teammate up front that would have allowed me to overtake him for a podium finish,” Massa said. “It was a pity, the race was going really well.”

Alonso said it was ‘unfortunate’ that Massa couldn’t stay near the front in the end.

“We wanted to help him but he got the drive-through penalty,” Alonso said. “It was a shame. The podium was very close for Felipe today. When I saw him fourth, I said this would be a very good celebration for him.”

Still in his car, Massa said over the radio that the penalty was absurd.

“Incredible, incredible,” Massa said. “Unacceptable.”

Massa said after the race that he was surprised with the penalty, saying it was the first time he saw it happen at Interlagos.

But replays showed Massa clearly crossed the line marking the pit entrance, which race stewards had previously warned would not be allowed for safety reasons.

Massa waved his hands to complain while driving through the pits to serve the penalty. He had three laps to take the penalty and waited until the last one to come in.

He returned to the track in eight place and wasn’t able to recover. “It wasn’t the kind of finish I expected,” he said.

Massa drove eight seasons with Ferrari but didn’t have his contract extended beyond this year and finished eighth in the drivers’ standings. He will be joining Williams next year.

Massa was applauded by Ferrari team members when he left for the track before the race. Team members were wearing a shirt that said “Thank you, Felipe,” in Portuguese.

The Brazilian competed in 139 races with the Italian team, second only to seven-time champion Michael Schumacher. Massa won 11 races with Ferrari and finished on the podium 36 times.