WASHINGTON - Rhode Island showed the third steepest decline in construction jobs for May, a month during which more states lost such jobs since June 2011, according to an Associated General Contractors of America analysis of Labor Department data released Friday.

Twenty-seven states and Washington, D.C., lost construction jobs from April to May, and 30 states experienced year-over-year job losses, the analysis shows.

The association warns that tens of thousands of construction workers could be out of work if new federal transportation legislation is not enacted before a June 30 deadline.

“As the public sector continues to restrain growth in construction demand, we will continue to see weak reports like this,” said Ken Simonson, the association’s chief economist, in a statement. “There isn’t enough demand for private sector structures to compensate for dwindling investments in highways, bridges, water systems and public buildings.”

Rhode Island showed a 3.9 percent loss in construction jobs, following Mississippi at 5.1 percent and Wyoming at 4.9 percent.

However, it was not among the states with the steepest yearlong declines. Mississippi was third on that list, with a 9.2 percent loss, topped by Alaska at 20.4 percent and Wisconsin at 10 percent.

Only 19 states plus Washington, D.C. added construction jobs year-over-year between May 2011 and May 2012.

“While the economy will have to get a lot better before we see big gains in construction employment, public cuts are not helping the situation,” said Stephen E. Sandherr, the association’s CEO, in a statement.” Passing a highway and transit bill, in particular, would give a needed boost to construction employment.”

Get the most up-to-date data on the Rhode Island and southern Massachusetts business community from the PBN List Center. Download and purchase PBN Lists as well as the complete Book of Lists in Excel format.