“They really covered all the bases,” said Dominick Stampone, the mayor of Haledon, in Passaic County, who belongs to the American Federation of Teachers and attended the program last year. “They talked about fund-raising, campaign finance reporting, dealing with the media, addressing a room, crafting your message and also about the core values we believe in, like affordable health care and living wage requirements.”

After the boot camp, the A.F.L.-C.I.O. gives novice candidates advice while they are running, pays for mailings to support them and arranges for volunteers to work on their campaigns. Similar efforts have been tried elsewhere, but none compare in size or success to New Jersey’s, which began in 1997 and has grown steadily.

Even labor’s political opponents expressed admiration. “The political parties supposedly try to do the same thing, to groom candidates from the grass roots, but the A.F.L.-C.I.O. does it more effectively,” said Richard J. LaRossa, a Republican former state senator who leads a conservative policy group, Solutions for New Jersey.

Besides the five current legislators who are union employees, five more in New Jersey are current or former shop stewards or local presidents, and perhaps two dozen others are or have been union members. Most come from private-sector unions, particularly in the building trades  the electrical workers are especially well-represented.

New Jersey ranks fifth among the states in union membership (New York is first), but it has declined over the last decade. Last year, 19.9 percent of New Jersey’s work force was union-represented (compared with 13.6 percent nationally and 27.2 percent in New York), down from 21.7 percent in 2000.