BUDAPEST, Hungary — Daniel Ricciardo heads into Saturday's qualifying for the Hungarian Grand Prix in a confident mood after showing impressive pace in Friday's two practice sessions.

The Hungaroring track reduces power output because of its tight and twisting nature, which means that the Red Bulls should be confident of matching Ferrari and Mercedes for race speed, and even challenging for a win.

With Ricciardo in good form, and the upgrades Red Bull has made for this race working well, the omens look good.

"I do feel like we have gained some grip in the car," Ricciardo said after Friday's practice runs. "(We) looked strong out of the box. We have stepped in the right direction."

Ricciardo has five podium finishes in the past six races. Even though he did not get on the podium at the British GP two weeks ago, he finished an impressive fifth after starting from 19th place due to grid penalties.

The Australian driver was 0.183 seconds quicker than Sebastian Vettel's Ferrari and 0.201 clear of Mercedes driver Valtteri Bottas in the afternoon session.

It left him feeling optimistic that he can challenge for a second win of the season, following his victory at last month's Azerbaijan GP.

"We may have a shot at actually fighting for big points this weekend," he said. "I genuinely feel we can."

Ferrari's Kimi Raikkonen overcame a power failure that briefly forced him off track in P2 and finished fourth quickest in the afternoon, ahead of Lewis Hamilton's Mercedes and Red Bull's Max Verstappen.

With the top six separated by just half a second, qualifying promises to be close.

Hamilton needs just one more pole position to equal seven-time F1 champion Michael Schumacher's record of 68, but the British driver expects to have to work hard for it on a track where he has won five times.

"It wasn't the easiest start to the weekend," he said. "It's super-tight between Ferrari, Red Bull and ourselves at the top of the leaderboard, so it's looking like it will be an exciting weekend."

Although Hamilton was happy with his car's pace, he felt the balance needs to be improved — an issue that has cropped up a few times this season for Mercedes. It also affected Bottas on Friday.

"I was especially struggling with the rear end of the car," Bottas said. "The temperatures are expected to rise tomorrow, which means that we really need to get the rear end of the car more stable. I think that will be the main area for us to focus on."

Vettel, the championship leader, leads Hamilton by one point after 10 races .

In the morning session, Ricciardo was 0.234 seconds quicker than Raikkonen and 0.372 ahead of Hamilton on a Hungaroring circuit that proved slippery despite warm weather conditions.

The red flag came out midway through the afternoon session after German driver Pascal Wehrlein lost control of his Sauber, swerving left across the track and into the barriers.

Then, toward the end of P2, the flag came out again after British driver Jolyon Palmer mistimed his exit from the final corner, hitting the barrier side-on and damaging the right side of his Renault.

Palmer has yet to score a point this season, and his Renault seat is reportedly coming under threat as Polish driver Robert Kubica continues his F1 comeback bid.

Friday's two sessions will have done little to reassure him, seeing as he also crashed right at the end of the morning's first practice.