After the US Congress agreed a $7.5bn aid package for Pakistan this autumn, the Obama administration was taken aback by the seemingly ungrateful reaction of its intended recipients. Pakistani opposition politicians fumed about "colonialism" and "imperialism". Military men spoke angrily of insults to national sovereignty implied in conditions attached to the aid.

But particular hostility was directed at US plans to spend over $800m on building a new, heavily fortified embassy in Islamabad, to be protected by the private security contractor, DynCorp. The activities of contractors in Iraq, notably Blackwater, have become notorious in the Muslim world. In addition, expanded US "bunker consulates" were announced for Lahore and Peshawar.

"Just the other day we had a television debate on America wanting to colonise us," one Pakistani said. "How easy it was for us to believe this when we hear of Blackwater setting up camp in our cities, buying hundreds of homes, not being accountable to the laws of our country, of hundreds of US marines on our soil, being allowed to enter without visas, of the enormous new US embassy being built which is like a mini-Pentagon."

Despite such complaints, US plans are going ahead. They include a $405m replacement embassy building in Islamabad, the construction of a $111m office annexe to accommodate 330 workers, and new housing units costing $197m. In Peshawar, scene of a devastating Taliban car bomb attack on Wednesday, the US plans to buy the city's only five-star hotel and turn it into a sort of diplomatic Martello tower.

The US says the new facilities are needed because old premises are insecure and it must accommodate the "civilian surge" of diplomats and officials into Pakistan and Afghanistan ordered by Barack Obama. But the American expansion in Islamabad mirrors similar developments in other Muslim and foreign capitals that are focal points for the Pentagon's "long war" against Islamist extremism.

Shocked by the 1998 al-Qaida attacks on its Nairobi and Dar es Salaam embassies, the US has opened 68 new embassies and overseas facilities since 2001 and has 29 under design and construction, the state department's bureau of overseas buildings operations says. Total worldwide spending on embassy replacement has been put at $17.5bn.

In Kabul, Baghdad, Jakarta, Cairo and beyond, in "allied" cities such as London and Berlin, Washington is building, reinforcing or expanding slab-walled, fortress-like embassies that act as regional overseas HQs, centres of influence and intelligence-gathering, and problematic symbols of superpower.

Historically speaking, these formidable outposts are the 21st century equivalent of crusader castles, rising out of the plain, projecting superior force, and grimly dominating all they behold.

As in Pakistan, the new strongholds attract plenty of criticism, acting almost as magnets for trouble. The massively fortified $700m Baghdad embassy, the biggest US mission in the world with 1,200 employees, was dogged by construction delays and militant attacks before it finally opened in January this year. Now even the state department's own inspector-general has ruled that the 21-building, 104-acre encampment is too big. "The time has come for a significant right-sizing," a July report said.

The Kabul embassy, which is negotiating an $87m purchase of 30 to 40 additional acres, encountered a different kind of trouble last month after photographs emerged of embassy guards engaging in sex acts, pouring vodka on each other, and dancing naked round a fire. The guards were employed by another private security firm, ArmorGroup North America. The revelations underscored existing concerns about security contractors. Investigators concluded the embassy's safety had been seriously compromised.

Away from the frontline of America's wars, the unveiling last year of the new US embassy in Berlin, close by the Brandenburg Gate, brought strong objections of an aesthetic nature. Architectural experts queued up to lambast the squat, custard-coloured but bomber-proof building, deriding it as a "klotz" (lump) built by barbarians.

One newspaper compared the offending edifice to a maximum security prison, another to a council house, while Frankfurter Allgemeine Zeitung fumed: "There is hardly a modern building in existence, with the exception of nuclear bunkers and pesticide-testing centres, that is so hysterically closed off from public spaces as this embassy."

On present trends, Londoners face being similarly shut-out as the US embassy currently centrally located in Grosvenor Square, Mayfair, prepares to move to a brand new concrete citadel in wild, far-off but hopefully al-Qaida-free Wandsworth.

The way the new embassies tend to physically cut off America's diplomats from the countries they are supposed to connect with is one good reason, among many, why Washington might want to rethink its laager policy. While effective security is obviously important, the worldwide rise of America's diplomatic fortresses undermines the kind of "soft power" outreach and public diplomacy that the Obama administration earnestly espouses.

In a policy-setting speech in July, secretary of state Hillary Clinton stressed the US need to communicate directly with other countries from the bottom up. "Reaching out directly to people will encourage them to embrace cooperation with us, making our partnerships with their governments and with them stronger and more durable," she said.

That makes sense. But it's not the message citizens of Islamabad are hearing. When America speaks to Pakistanis and other Muslim countries, it too often sounds like it's shouting down from the battlements.