The United States' longstanding “special relationship” with the United Kingdom is being tested as Scotland prepares to vote on whether to become independent after a 307-year political union with Britain.

The Sept. 18 referendum puts the Obama administration in an awkward diplomatic spot. The U.S. has no greater ally than the U.K. and is careful to avoid disharmony with British Prime Minister David Cameron, who is determined to preserve England's union with Scotland.

Yet the U.S. has had cozy cultural ties with Scotland for centuries. And because the U.S. itself split from Britain, warning Scotland against taking a similar step — particularly in a peaceful, democratic fashion — would smack of hypocrisy.

More tangibly, an independent Scotland would mean another valuable ally for Washington. The U.S. also would seek a trading partnership with the new country, particularly since it would control vast North Sea oil reserves.

“If Scotland votes for independence, there’s not much of a choice [for Washington]. It’s not going to turn its back on Scotland by any means,” said John MacDonald, director of the Scottish Global Forum, a nonpartisan think tank in Glasgow.

But a U.K. split poses security questions for the U.S., as Scotland would demand the removal of British nuclear warheads. Because moving them would be costly and difficult, some analysts have speculated that the British government might be tempted to scrap its entire nuclear arsenal.

“It would be interesting to see what the U.S. thought of that,” MacDonald said. “In one respect, it could be absolute panic in Washington — they don’t want to see the end of the Anglo-American nuclear status quo.”

Polls continually suggest a vote for the status quo. But in recent months the gap has shrunk to single digits, with at least 20 percent still undecided.

Independence advocates say Scotland knows best how to govern itself. And Scots have complained for decades that London imposes unfair austerity measures. The "Yes Scotland" campaign says each Scottish taxpayer would gain about $1,700 annually, partly through increased oil revenues, though London disputes this and argues that overall Scotland benefits financially from being part of the U.K.

The independence movement has put together a determined grass-roots campaign that is expected to boost voter turnout in pro-independence working-class districts.

“This is a once-in-a-generation opportunity,” said Stephen McDowell, a Glasgow high school teacher and independence activist. “If we don’t do it now then the momentum will be gone. The [pro-union] conservatives will be able to sit back and say, ‘They had their chance, they blew it, that’s it.’"

The Obama administration has stayed on the sidelines. When asked to weigh in on the issue, Obama said, “It's up to the people of Scotland.”

But he sparked controversy when he added, “From the outside, at least, it looks like things have worked pretty well” for the U.K. "And we obviously have a deep interest in making sure that one of the closest allies that we will ever have remains strong, robust, united and an effective partner."

His latter comments sparked headlines, with many interpreting them as an endorsement for the “Better Together” pro-union campaign.

Scottish National Party leader Alex Salmond focused instead on the president calling the vote an internal Scottish matter.

“The environment in Scotland is such that every single comment is seized upon by both sides — anything at all, any scrap that they can use — to further enhance their position,” McDowell said.

Yet most Scots are little swayed by what outside political leaders say – even one as popular there as Obama, MacDonald said.

"Everybody is aware that the default position of all other national governments [is that] 'we'd prefer the status quo,'" he said. “I don't think anybody, even the most raging, pro-independence advocate, would've ... taken offense at Mr. Obama's comments."