MOGADISHU (Reuters)- Somali rebel group al Shabaab has banned the use of the Internet in the Horn of Africa country, giving telecom operators 15 days to comply with the order, the militants said.

Although the rebels, who profess ties to al Qaeda, have been significantly weakened by African Union troops in the past couple of years, they have carried out hit-and-run attacks on government targets in the capital and beyond.

The group, which has waged a seven-year insurgency fought by militants seeking to impose a strict interpretation of sharia law, has in the past tried unsuccessfully to ban several aspects of modern life including mobile phone ringtones, listening to music and money transfer services.

However, this time al Shabaab could potentially carry out the ban in southern and central Somalia where they still control some areas used by telecom firms for their operations.

The group has in the past followed up its threats with gun and bomb attacks on those who fail to comply.

"Any company or person who fails to comply with the rule will be dealt with according the Islamic sharia," the group said in a statement posted on the Internet. Al Shabaab itself regularly communicates via Facebook and Twitter feeds.

Government officials and the two main telecom operators Hormund and Telsom were not available immediately to comment. Hormund, which offers Internet connections through both wireless and fibre-optic networks has been testing its third generation (3G) services in the country.

In the past, the group, attempted to ban mobile money transfers - vital in an economy with an underdeveloped banking system - saying they helped feed Western capitalism and were turning Somalia's Muslims against Islamic banking practices.

Shabaab has also tried to ban movies, dancing at wedding ceremonies and playing or watching soccer.

In April last year, a bomb exploded outside the headquarters of Somalia's biggest bank, wounding at least two people hours after the al Qaeda-linked militants ordered the company cease operations in areas under their control.

Al Shabaab has also thrown out more than a dozen humanitarian groups from areas under its control in the past three years, including the U.N food agency, the International Committee of the Red Cross and Islamic Relief.