MADRID, July 26 (Xinhua) -- Spanish Prime Minister Mariano Rajoy arrived at the court in the town of San Fernando de Henares on Wednesday morning to testify in the ongoing Gurtel corruption trial.

Rajoy's testimony has provoked massive media interest, with almost all of Spain's national television networks covering the event live.

The Spanish prime minister's arrival was surrounded by strict security measures, with two trailers strategically parked in order to block a clear view of Rajoy's entrance into the court and to ensure that a planned protest was kept at a distance.

Rajoy is the first Spanish prime minister who has been called to give evidence in a trial while still in office and he will do so in a case in which his right-wing People's Party (PP) is deeply implicated for receiving illegal payments as part of a cash-for-favor scandal.

This money is then alleged to have been placed in a parallel accounting system known as the 'B' accounts and used to finance election campaigns as well as illegal cash payments to high-ranking party members, including Rajoy himself, whose name is next to an alleged payment of 11,000 euros (12,800 U.S. dollars) in the list kept by the former PP treasurer, Luis Barcenas, who is one of the figures being accused in the case.

Rajoy is expected to testify for around two hours and face questions about the finances of his party during the period 1999-2005, during which he held several high-ranking positions, from minister for education, deputy prime minister to candidate for the 2004 general election.

Rajoy was once required to testify by video, but that request was turned down by the court. However, he has been granted the privilege not to testify in the same place as other witnesses in front of the judge and to do so from the side of the courtroom.