SHANGHAI - Mercedes driver Lewis Hamilton topped the leaderboard as expected during both practice sessions at the Chinese Grand Prix on Friday, though Ferrari showed it had the pace to possibly challenge the silver cars over the weekend.

Hamilton set the fastest time of the day at 1 minute, 37.219 seconds, which Mercedes said was 1.2 seconds faster than last year's best practice time at Shanghai International Circuit.

Ferrari's Kimi Raikkonen was just behind the British driver in second place, trailing by less than a half second.

"It's quite close between us and Ferrari," Hamilton said. "I think we definitely have a race like we said we would."

Red Bull's Daniel Ricciardo set the third-fastest time of the day, giving his struggling team a boost a day after company owner Dietrich Mateschitz reiterated his threat to pull out of Formula One if he can't field a competitive team.

Ferrari's Sebastian Vettel was fourth-fastest and Mercedes' Nico Rosberg could manage no better than fifth after running slightly wide at the final corner of his flying lap on the soft tires.

The most bizarre moment of the practice sessions came when an intruder dashed across the track early in the second run and leapt over the pit wall and through a gap in the fence before being apprehended by security staff.

The man barely made it across the track in between cars coming down the main straight. The incident did not cause a delay to the practice session.

Ferrari had been hoping to build on Vettel's resurgent victory two weeks ago at the Malaysian Grand Prix, although the German driver tried to temper expectations of his team's chances of winning in Shanghai, where the long straights and cooler temperatures favour the Mercedes cars.

Vettel was a full second slower than Hamilton in the opening practice session, but Raikkonen managed to close the gap somewhat in the afternoon.

Ricciardo's time also gave slumping Red Bull reason to believe it could contend for a podium position after a disappointing start to the season.

Red Bull had been the dominant team in Formula One two seasons ago, but its engine supplier, Renault, hasn't been able to keep up with Mercedes since the new hybrid engines were introduced to the sport last year.

The team also had brake problems in Malaysia that prompted it to return to the brake system it used last year for the Chinese Grand Prix.

Even with the change, Ricciardo's teammate, Daniil Kyvat, still had issues with his brakes in Friday's practice, going off the track, crossing a gravel path and bumping into a wall when he failed to slow down.

The Russian driver had the sixth-fastest time of the session before abandoning his car.

Rounding out the top 10 were Williams' Valtteri Bottas, Sauber's Felipe Nasr, Lotus' Romain Grosjean and McLaren's Jenson Button.