Shell’s ill-fated attempt to tow an offshore oil rig from Alaska to Seattle in the final days of December was motivated by a desire to avoid $7m (£4.3m) of Alaskan state taxes, it emerged today.

But the oil giant will instead suffer a multi-million dollar loss on the exercise after the rig ran aground off the Alaskan coast on Monday night.

The rig was beached during a violent storm on its way to a Seattle shipyard for routine maintenance, in a round-trip timed so that, thanks to an accounting loophole, Shell could avoid an Alaskan state tax.

Download the new Independent Premium app Sharing the full story, not just the headlines

However, because the rig ran aground late on New Year’s Eve and began 2013 within three miles of the Alaskan coast, Shell remains liable for a unique state property tax on equipment dedicated to oil and gas development and exploration.

Shell admitted today that its decision to move the rig, the Kulluk, just weeks after it was brought to the Gulf of Alaska in November, was motivated by financial considerations.

“It’s fair to say that the current tax structure related to vessels of the type influenced the timing of our departure. It would have cost Shell multiple millions to keep the rigs here,” a Shell spokesman said.

Another Shell spokesman, in London, said: “While we are aware of the tax environment wherever we operate, the driver for operational decisions is always governed by safety. In this case, what mattered most to Shell was the two-week window of favourable weather that was forecasted for that journey.”

He denied suggestions that the routine maintenance and inspection could have been carried out in Alaska.

David Gregory, a councillor for the city of Unalaska, said Shell’s equipment tax bill would come to between $6m and $7m, adding: “Maybe they should have just stayed there.”

In addition to the tax, Shell faces millions of dollars of charges including the cost of repairs. It must also reimburse the federal and state governments for an emergency response which involved more than 500 people, including the evacuation of the rig’s crew of 18 by Coast Guard helicopters in weather the Captain later described as “close to a hurricane”.

Salvage experts flown to the rig concluded that none of the 139,000 gallons of diesel and 12,000 gallons of hydraulic fluids on board had been spilled. However, they cautioned that it was unclear how serious the damage was or how long it would take to refloat and move the Kulluk.

For Shell, the incident is the latest in a series of setbacks in its costly pursuit of oil in the environmentally-sensitive Arctic region which is nonetheless regarded as the next great frontier for oil exploration.

The Kulluk began its journey on 21 December and a week later was about 50 miles south of Kodiak Island – out of reach of the Alaskan tax man.

But the tug that was pulling it suffered multiple engine failures just as a subtropical cyclone made its way into the North Pacific. On Monday night, in the dying hours of 2012, the rig ran aground about 1,600 feet from Sitkalidak Island, next door to Kodiak.

Shell has so far spent £3.2bn buying up leases and on exploratory drilling off Alaska’s north and north-west coasts but has yet to discover any commercial quantities of oil. Full-scale production in the region is still thought to be years away.