Massachusetts employers increased hiring for the first time in four months while the unemployment rate rose as more people looked for work in May, the state Executive Office of Labor and Workforce Development reported Thursday.

The state added 3,500 jobs in May, ending three consecutive months of job losses. The state has gained 14,500 jobs since the beginning of the year. The unemployment rate rose to 6.6 percent from 6.4 percent in April as the economy did not create enough jobs to absorb the nearly 9,000 additional workers who entered the job market.

The labor force has grown in each of the past two months, which economists view as a sign of an improving job market. More people tend look for work when they sense increasing opportunities, economists say.

Advertisement - Continue Reading Below

The national economy has experienced similar trends. In May, US employers added 175,000 jobs, but the unemployment rate rose slightly, to 7.6 percent, as more workers entered or returned to the labor force. Only those with jobs or actively seeking work are counted in labor force.

In Massachusetts, job gains were broad-based in May, spread across most major sectors. Trade, transportation and utilities, which includes retailers, led the gains by adding 2,000 jobs. Construction added 1,000 jobs.

Three of the state’s key employment sectors also posted solid gains. Professional, scientific, and business services, which includes technology, technical, and consulting firms, added 900 jobs last month, as did financial services. Education and health services gained 800.

Manufacturing shed 1,200 jobs in May. Also losing jobs last month were leisure and hospitality, which shed 900; information, 600, and government, 200.