CEDAR RAPIDS, Iowa — Former vice president Joe Biden said he wanted to spend Monday celebrating the role organized labor has played in improving the lives of Americans. But moments into his first Labor Day appearance, the presidential candidate turned instead to the nation’s latest mass shooting, which left seven dead in the west Texas town of Odessa on Saturday.

“It is irrational, with all due respect to the governor of Texas, it is irrational what they’re doing on the same day you see a mass shooting . . . and we’re talking about loosening access to have guns,” he told reporters at a picnic in Cedar Rapids.

“To be able to take them into places of worship, store them in schools, I mean, it’s just absolutely irrational, and it’s all about special interests, and it has to stop.”

Stopping it, he conceded, meant going against one of his stated goals: working with Republicans, including Senate Majority Leader Mitch McConnell (R-Ky.).

“I think there’s no compromise,” Biden said. “This is one where we are going to just have to push and push and push and push and push. And the fact of the matter is, I think it’s going to result in somebody being defeated.”

Since retaking control of the House in January, Democrats have passed measures to extend background checks to all gun sales and to give investigators more time to complete such checks. McConnell has refused to allow Senate votes on the measures. President Trump has repeatedly indicated he could support some tightening of background checks but then has backed away and insisted existing checks are sufficient.

Texas’s Republican governor, Greg Abbott, supported measures loosening restrictions on weapons, such as those noted by Biden. Since mass shootings this summer in El Paso and Odessa, Abbott has argued along with national Republicans that mental health measures are a solution.

Biden and other candidates for the 2020 Democratic nomination fanned out across the country on Labor Day, nibbling on hot dogs, cheering minor league baseball teams and making a pitch to voters to put them into the nation’s highest political office. But the long weekend was filled with more than revelry and retail politics. A deadly hurricane bashed the Bahamas and now threatens the East Coast, churning up questions about whether climate change is intensifying storms. And the mass shooting in Odessa revived the nation’s fractious debate about what the government should do to stem gun violence.

The weekend’s anxieties filtered into every campaign stop.

In Hampton Falls, N.H., Sen. Elizabeth Warren (D-Mass.) told a crowd of 800 about the 1912 textile strike in Lawrence, Mass., highlighting how women set aside their differences to stand up to power. But her remarks also pivoted to gun violence, which she said should be treated “as the public health emergency that it is.”

“It’s going to take a lot of pieces and a lot of changes that we need to do to bring down deaths from gun violence,” Warren said. “That needs to be a goal. Deaths from mass shootings. Deaths that happen in parks and on sidewalks every day. Deaths from domestic violence. Deaths from suicide. We need to bring down deaths from gun violence, and that’s why I have a comprehensive plan to do that.”

At stops in New Hampshire throughout the holiday weekend, Sen. Bernie Sanders (I-Vt.) often referenced the Odessa shooting, saying it underscored the need to pass legislation expanding background checks and banning assault weapons. He also excoriated politicians opposed to such measures.

“Trump and McConnell — listen to the American people, not the NRA,” Sanders said at a campaign stop in Peterborough on Monday afternoon.

Like several others vying for the presidency, Sanders used the holiday weekend to portray himself as a champion of union workers. On Saturday, the campaign announced that volunteers would hold 60 events across the country to drive turnout, organize workers and show solidarity with union members.

“It means equal pay for equal work for women. It means making it easier for workers to be able to join unions. It means that we do not allow profitable corporations to shut down in this country and move abroad for cheap labor, that we have to be strong about that,” Sanders said.

Across the country, Sen. Kamala D. Harris (D-Calif.) addressed a rally of Kaiser Permanente employees who gathered in Los Angeles on Monday to stage a protest to highlight their working conditions.

“Every person in America has benefited from organized labor,” Harris said. “Today, we honor the sacrifices that you have made. The blood, sweat and tears that for generations organized labor has put into the streets to organize and to marching, to shouting, to negotiating, to striking, to do whatever is necessary to make sure that working people receive the dignity that they deserve and they receive the recognition of the value of their labor.”

“It was you who brought us the five-day workweek, it was you that brought us the eight-hour workday. It was you who brought us weekends,” she said. “All working people in America should be celebrating the leadership and the sacrifice of organized labor.”

But she also chided Trump for choosing to play golf over the long weekend as a major hurricane threatened the lives of Americans along the Eastern Seaboard.

“I think he just does not have the ability to really have a sense of empathy for people who are enduring hardship and enduring pain,” she said. “The fact that he’s playing golf while all this is happening is not surprising.”

Sean Sullivan and Laura Hughes contributed to this report.