(Reuters) - Small businesses' confidence in the economy's future declined in June by the most in two years, increasing the threat that an economic slowdown could stretch into the second half of the year.

The National Federation of Independent Business said on Tuesday its Small Business Optimism Index dropped 3 points last month to 91.4.

Eight of the index's 10 components fell, with businesses downbeat on sales, profits and hiring.

American companies slammed the brakes on hiring in the second quarter, a warning sign the recovery from the 2007-2009 recession is faltering.

Many economists think companies are holding back due to fears of Europe's debt crisis as well as U.S. government plans for severe belt tightening in 2013. The NFIB data signals confidence in the recovery continues to erode.

"It appears that the labor market softness is expected to persist for some time still," said Michael Dolega, an economist at TD Economics in Toronto.

A separate report from the Labor Department offered more hopeful signs for the economy.

Job openings in May increased 195,000, the most in five months, suggesting business is brisk enough to demand more labor, even if companies are hesitant to pull the trigger and fill openings.

A spate of weak data for everything from hiring and manufacturing to retail sales has pointed to sluggish second-quarter economic growth.

Most economists still expect growth will pick up again in the second half of the year, despite the possibilities that Europe's debt crisis could worsen or that the U.S. government might go forward with a massive belt-tightening plan.

The NFIB survey for June suggests small businesses smell trouble ahead. The drop in the index was the largest one-month fall since June 2010.

"If not a recession reading, it is surely an indication of slow growth," NFIB economist William Dunkelberg said.

(Editing by Neil Stempleman)