Religiously motivated attacks killed 13 people in Nigeria on Tuesday, as tens of thousands took to the streets in a second day of nationwide protests against the scrapping of a fuel subsidy that has nearly doubled petrol prices.

A mob killed five people in a mosque in Benin City in the south while in the north, Islamist militants shot dead eight people in a bar.

The attacks raised fears that President Goodluck Jonathan's two major security headaches, opposition to fuel deregulation and sectarian strife, were merging into one.

An aid worker whose organisation operates in the Benin area and who declined to be identified, said the mosque attack had forced 3,000 Muslims of northern origin to flee.

The assault was most likely a reprisal against northern Muslims for attacks by the radical Islamist sect Boko Haram on Christians of southern origin in the north, including a spate of deadly raids on churches which have killed dozens.

Suspected Boko Haram members opened fire on bar in the northeastern Nigerian town of Potiskum, in Yobe state, on Tuesday, killing eight people, four of them policemen, the local police commissioner said.

Boko Haram's increasingly violent northern-based insurgency is straining relations between Nigeria's largely Christian south and its mostly Muslim north. That has stretched security forces now also occupied with containing fuel protests.

When subsidies on imports of motor fuel were scrapped on January 1, many citizens saw what they regard as their only welfare benefit disappear and the price of petrol more than doubled to 150 naira ($0.93) a litre.

Tens of thousands demonstrated in cities across the country of 160 million. Tuesday's protests were bigger than Monday's in Lagos, Nigeria's largest city, and in the capital Abuja and were as big as Monday's in other major cities.

TEST OF JONATHAN'S RESOLVE

Jonathan has shown no sign of weakening in the face of protests similar to those that have derailed past attempts to scrap the fuel subsidy.

Ratcheting up tensions with unions, the government's attorney general said late on Tuesday that striking public sector workers would not be paid, because the strike has been ruled unlawful by the courts.

A court injunction outlawed the strike last week on the grounds that it is not an industrial dispute.

The strike is the first true test in policy terms of the Jonathan presidency. They chose the issue and the timing, said Antony Goldman, Nigeria specialist and head of London-based PM Consulting.

If they prevail, the prospects for reform in other delicate areas - the constitution, oil and gas, revenue - all improve. If the strikers prevail, the administration's credibility is massively damaged. If oil exports are not hit, the government will hope the thing just peters out.

In Rivers state, in the oil-rich Niger Delta, the local government said it would cap the price of fuel in the state at 137 naira per litre. Although this is more than double the subsidised price it is the first sign of local government compromising on the free market message pushed by Jonathan.

Thousands gathered outside the labour union headquarters in Lagos and marched to the marina that runs along its wide lagoon. The roads of the normally heaving commercial hub, notorious for its traffic jams, were largely empty.

Oil workers were also on strike and the offices of international companies such as Shell and Exxon Mobil were shut. But Shell and the state oil company said output was unaffected.

A group of youths set up a road block of burning tyres on the main bridge over the lagoon connecting Lagos's two islands to the mainland, shouting at cars to turn back. The betrayers in government must free us from slavery, one placard read.

Police fired live rounds into the air to disperse a crowd in the middle-class suburb of Lekki.

On Monday police shot dead two people in the northern city of Kano who were helping pull down the walls around Government House, the seat of the state governor, according to witnesses and hospital staff. Police said one person was killed.

Police spokesman Yemi Ajayi said a policeman who shot dead a protester in Lagos on Monday had been arrested and an investigation launched into the incident.

Some independent market stalls and shops were open in many cities but banks, government offices and large company buildings remained closed. Some flights into Nigeria were cancelled.

But a spokesman for Shell Nigeria said there was no impact on (oil) production at this time.

Much of Nigeria's oil comes from offshore fields that rely on small numbers of staff and heavily automated equipment.

UNBEARABLE WEIGHT

If we have to starve to make the president reverse his decision, I will do it, said Musa Abdullahi, a 43-year-old iron worker in Kano, where police helicopters circled overhead.

This strike is about every Nigerian and the future of our nation. Every government has told us that more money on petrol will better our lives in the long term, but nothing changes.

Literary idol Chinua Achebe and several other writers lent their support. Achebe said removing subsidies placed an unbearable economic weight on their (Nigerians') lives.

Seun and Femi Kuti, musicians and sons of the late Afrobeat legend Fela Kuti, led one of the biggest rallies in Lagos, gaining vocal support from adoring fans in the crowd.

But economists say the subsidy is wasteful and corrupt, sending billions of dollars intended for the poor to a cartel of petrol importers, and encouraging smuggling into neighbouring Benin and Cameroon, where fuel is more expensive.

The government estimates it will save 1 trillion naira ($6 billion) this year by eliminating the subsidy.

Finance Minister Ngozi Okonjo-Iweala said 90 billion naira a year of the saved money would go on roads and infrastructure, 57 billion on the railways and 60 billion on poverty safety nets.

Pro-government adverts reading Nigerians, let us remember that this is the first administration that has delivered on most of its promises were on the front page of several newspapers.

Jonathan has also pledged to cut the salaries of his administration by 25 percent.

To most Nigerians, such gestures and promises feel tired and empty. Though many politicians have grown rich from a sector that exports $200 million of oil a day, decades of corruption have left power and transport networks, education and healthcare badly neglected and dilapidated.

($1 = 162.10 naira)

(Additional reporting by Akintunde Akinelye and Chijioke Ohuocha in Lagos, Austin Ekeinde in Port Harcourt, Joe Brock, Camillus Eboh, Felix Onuah and Afolabi Sotunde in Abuja, Anamesere Igboeroteonwu in Onitsha and Ibrahim Mshelizza in Maiduguri; Writing by Joe Brock; Editing by Giles Elgood)