France's far-right presidential candidate Marine Le Pen has sparked controversy on the last day of her Lebanon visit, walking away from a meeting with the country's top Sunni Muslim religious leader after refusing to wear a headscarf.

The leader of National Front (FN) party on Tuesday arrived at Sheikh Abdellatif Deryan's office in the capital, Beirut, and was offered a white shawl to cover her hair. Le Pen promptly refused, walked towards her car and left.

Al Jazeera's Natasha Ghoneim, reporting from the Beirut, said that critics accused Le Pen, whose party takes an anti-immigrant stance, of staging the incident as a kind of stunt.

"Observers, pundits and voters here say that they believe that this was planned on her part because it would play very well to her far-right base at home, and also because they say it might detract from a growing scandal she is facing," Ghoneim said.

The presidential candidate is facing a corruption scandal as French police searched on Monday the Paris-based headquarters of FN in relation to a probe into alleged misuse of EU funds allocated to her as a member of the European Parliament.

"Everybody expected her to spark a new controversy, and right now Le Pen is embroiled in a new scandal, so ... people will perceive that as an attempt to divert attention from the legal consequences of her actions over the past few years," Yasser Louati, a human rights and civil liberties activist in Paris, told Al Jazeera.

"This was a trap and a set-up because she wanted to send a message to her own voters and supporters that she somehow refused to respect the local customs in a Muslim-majority country."

'Le Pen was informed'

Speaking to journalists as she walked away from the meeting, Le Pen said she had met in the past with the Grand Mufti of Egypt's Al Azhar, one of the world's leading Sunni scholars, without having to wear a veil.

"So, I have no reason to," she said, adding that she had told the grand office's office on Monday that she would not wear a headscarf.

"They did not cancel the meeting, so I thought they would accept that I will not wear the scarf," Le Pen said.

"They wanted to impose this on me, to present me with a fait accompli. Well, no one presents me with a fait accompli."

In a statement on Tuesday, the press office for the Grand Mufti said it "had informed the presidential candidate, through one of her assistants, of the need to cover her head when she meets his eminence, according to the protocol assumed by Dar al-Fatwa", the highest Sunni authority in Lebanon.

"Dar al-Fatwa officials were surprised by her refusal to conform to this well-known rule," the statement added.

OPINION: Elections in France: It's all about security

Tuesday is Le Pen's last day in Lebanon, where she met a foreign head of state for the first time, President Michel Aoun.

The FN leader also met Prime Minister Saad Hariri, a Sunni Muslim, and Foreign Minister Gebran Bassil.

Shunned by European leaders over her party's stance on immigration and its anti-EU message, Le Pen's meeting with Lebanese top officials aimed to boost her international credibility.

"This visit was viewed as an opportunity for her to enhance her stature, build her foreign policy credentials, and gain a better understanding of the Middle East," Al Jazeera's Ghoneim said.