MOSCOW — Exxon Mobil, welcome to the world of the “masky show.”

A day after Exxon, the American oil giant, struck a strategic alliance with Russia’s state-owned oil company, police agents in Moscow staged a vivid reminder of what can happen to foreign petroleum partners that get on bad terms with the government.

Commandos armed with assault rifles raided the offices of the British oil company BP on Wednesday, in one of the ritual armed searches of white-collar premises that are common enough here to have a nickname: masky shows (so-called because of the balaclavas the agents often wear, although this time they reportedly burst in bare-faced.)

Whether the Russians intended to send a signal or not, the episode seemed to serve notice to Exxon that, when it comes to dealing with the state-run business world of Prime Minister Vladimir V. Putin, Exxon isn’t in Texas anymore.

“That incident, I’m sure, made Exxon very uncomfortable the day after they signed their deal,” Matthew Lasov, director of research at Frontier Strategy Group, a consultancy for companies operating in the developing world, said of the raid.