The Massachusetts economy lost jobs for the first time in seven months in June, reflecting a sharp slowdown as looming uncertainties about the economic crisis in Europe and political gridlock in the United States make employers cautious to hire.

“The state’s economy is still growing, but it’s also slowing,” said Northeastern University economics professor Alan Clayton-Matthews. “Employment growth has been roughly the same in Massachusetts as the US.”