NEW YORK — U.S. stocks fell the most in three weeks Wednesday, with the Dow Jones Industrial Average halting a five-day rally, as the World Bank cut its forecast for global growth and Boeing Co. sank.

The world’s largest plane maker dropped the most in two months after U.S. House Majority Leader Eric Cantor’s defeat in a primary election threatened congressional reauthorization of low-cost lending that benefits the company. Bank of America Corp. dropped 2.1 percent after a report said the Justice Department may seek $17 billion to settle probes into mortgage lending. Anadarko Petroleum Corp. rose to a record amid speculation of a takeover. H&R Block Inc. added 4.6 percent after reporting sales that topped analysts’ forecasts.

The Standard & Poor’s 500 Index declined 0.4 percent to 1,943.89 at 4 p.m. in New York, the most since May 20. The Dow average retreated 102.04 points, or 0.6 percent, to 16,843.88, ending a streak that pushed it to an all-time high. About 5.2 billion shares changed hands on U.S. exchanges Wednesday, 17 percent below the three-month average at this time of day.

“That negative movement is the World Bank adding pressure with concerns about growth,” Robert Pavlik, chief market strategist at Banyan Partners LLC in New York, said in a phone interview. Pavlik helps oversee $4.5 billion. “People are tentative with a market that’s trading near all-time highs with low growth prospects.”

Cantor lost to a tea party-backed candidate in Tuesday night’s Virginia primary, fueling concern about further gridlock in Washington. The defeat could also have long-range market repercussions, as the seven-term House veteran was an ally for Wall Street on issues ranging from the 2008 Troubled Asset Relief Program to defending the Export-Import Bank.

“There were very few folks who expected this,” Michael Block, chief strategist at New York-based Rhino Trading Partners LLC, said in an interview. “I’m not concerned about the debt ceiling but some are and I will say Cantor was good at finding compromises relative to the rest of the party.”

Since Republicans took control of the House in 2011, debates over the debt limit – the total amount of money the U.S. government can borrow to finance existing obligations such as Social Security and Medicare – led to eleventh-hour showdowns that raised concerns that the government could default on its obligations, roiling financial markets. Congress voted in February to suspend the limit until March 15, 2015.

Cantor’s defeat raises concerns about the future of political compromise, Goldman Sachs Group Inc. Chief Executive Officer Lloyd Blankfein said.

“I hope it doesn’t mean that it will be impossible from this point forward to compromise on issues like the budget, immigration policy,” Blankfein said in a television interview with CNBC Wednesday. “This is not necessarily a good signal but we’ll have to see how this plays out.”

The S&P 500 slipped less than one point Tuesday, halting a four-day rally, as investors considered equity valuations. The gauge trades at 16.4 times the projected earnings of its members, up from a multiple of 14.8 at the beginning of February. The index has advanced 7.1 percent through Tuesday since a low on April 11.

The World Bank forecast in a report that the global economy will expand 2.8 percent this year, down from a January projection of 3.2 percent. The lender predicted slower growth for the U.S., China, Russia, India and Brazil. It left the estimate for world growth in 2015 unchanged at 3.4 percent

Boeing slid 2.3 percent to $134.10 for the biggest drop in the Dow.