Set-up changes to the cars of Lewis Hamilton and Nico Rosberg aimed at making the Mercedes competitive against Ferrari contributed to the brake problems both cars faced at the end of Sunday's Bahrain Grand Prix.

Rosberg lost second place to Kimi Raikkonen at the start of the penultimate lap after his brake-by-wire failed on the entrance to Turn 1. Rosberg outbraked himself and lost the position, putting an end to the chances of Mercedes taking a one-two.

"We saw it in Nico's system all race from lap one but it finally went wrong on the third last lap, so that's why he went long because the brake-by-wire system converted from active to passive where it's no longer a powered system," Mercedes technical boss Paddy Lowe explained. "Which is fine, you still have brakes, but it takes a bit of getting used to."

Hamilton's issue came under braking for turn one on the final lap and Lowe confirmed it too was a brake-by-wire failure, although not as detrimental to his race.

"I think my brakes just got a bit warm when I was behind a few backmarkers", Hamilton said. When you're behind them there's no cool air coming into the brakes, so they got a bit warm. But it wasn't really a problem."

Mercedes boss Toto Wolff explained that set-up changes were made between Friday and Saturday after long runs in practice showed that Ferrari had an advantage on the tyres. The changes then put extra strain on the brakes resulting in the failures.

"It is set-up issues and we knew the changes we made on the car were compromising a little bit the brake temperatures. We knew what we were doing. But then it was a hard race with lots of overtaking, especially in Nico's side, and then both cars struggled to make it through the backmarkers at the end of the race. The minute you follow another car or a couple of cars, the airstream collapses and this is why it made the brakes go.

"It is never one single solution, so you try to tackle the problem that we had on the Friday and the Saturday afternoon with a couple of adjustments. One of them was linked to the capability of brake wear, so in hindsight and knowing that this caused a problem and nearly cost us the race and P2 we will probably look at things again and do things differently in the future."

Wolff admitted the Hamilton issue surprised the team as they were focused on Rosberg.

"The interesting thing is that we were discussing the car overall and the issues we had and monitoring Raikkonen catching up, so on Nico's car the brake failure didn't come as a surprise as we saw the higher temperatures. On Lewis's car it was a bit more of a surprise and must have been linked to the fact that he gave it a gentle push seeing Kimi come and making his way through backmarker traffic.

"Lewis's came after the heavy braking on the long straight into the last lap. So he had the full last lap without any brake-by-wire."