LONDON — Hackers compromised Twitter accounts of The Associated Press on Tuesday, sending out an erroneous tweet about an attack at the White House.

The tweet said that there had been two explosions at the White House and President Barack Obama was injured. The attack on AP’s Twitter account and AP Mobile Twitter account was preceded by a phishing attempt on AP’s corporate network.

The AP confirmed that its Twitter account had been suspended following a hack and said it was working to correct the issue.

The stock market briefly dropped, then recovered, after the fake tweet about an attack on the White House was posted.

The AP released the following statement at 1:12 p.m.: “The @AP twitter account has been hacked. The tweet about an attack at the White House is false. We will advise more as soon as possible.”

The Dow Jones industrial average fell more than 150 points after the fake Twitter posting, then quickly recovered.

Other markets also reacted to the fake posting.

The price of crude oil fell, then rose back. The yield on the benchmark U.S. government bond, the 10-year Treasury note, briefly dropped as traders shifted money into low-risk investments.

The turmoil lasted for about five minutes. By about 1:13 p.m., stocks, bonds and crude oil were all trading about where they were before the fake tweet was posted.