Dakar (AFP) - The brother of Senegal's president resigned Friday from his controversial role at a commodities firm, sparking a violent protest by opposition groups who have levelled corruption allegations against him.

Aliou Sall, younger brother of President Macky Sall, is accused of helping Timis Corporation Senegal unfairly secure favourable conditions for the company while he was on its board.

Opposition parties and civil society groups have long questioned the involvement of a presidential family member in a firm that jointly controls offshore oil and gas deposits alongside the Senegalese government.

Aliou Sall, who is also the mayor of a Dakar suburb, confirmed to AFP by telephone Friday he would "no longer be in charge of the group's activities in Senegal".

This was not enough to stop hundreds of people joining an opposition rally on Friday afternoon calling for greater transparency over oil and gas contracts signed between foreign firms and the Senegalese government in recent years.

Organisers said 1,000 people gathered in Dakar to brandish banners reading "No to nepotism over natural resources" and "Oil and gas for the people".

Sporadic clashes broke out and stones were thrown at police, according to an AFP reporter at the scene, who also saw police use tear gas on the crowd.

A police official put the number of protesters at around 500.

Writing on his Facebook page, Aliou Sall had hit out at a "campaign of demonisation" and said he was only resigning to put "the president of the republic at ease".

He said he would start a new role within parent company Timis Corporation, owned by Romanian-Australian tycoon Frank Timis, and said he would be involved in "the development of future projects in Africa".

Sall and Timis lodged a legal complaint on Monday against 11 individuals, including former prime minister Abdoul Mbaye and several journalists, accusing them of "defamation and spreading false news" over the affair.

Timis sold a chunk of its interests in oil and gas exploration off Senegal to Texas-based Kosmos Energy in 2014, but retains a 30 percent stake in the project.

The government has just announced the creation of a new body of ministers and industry figures to scrutinise regulations on oil and gas to "reinforce the package of measures on transparency within the natural resources sector".