The California State University system and the union representing thousands of professors and lecturers reached a tentative deal on Monday to raise wages, ending what was the largest strike by university faculty members in U.S. history.

The deal, announced by both sides on Monday night, came just hours after the California Faculty Association, the union that represents 29,000 professors, lecturers, librarians, counselors and coaches, began what was planned as a five-day walkout across the 23 C.S.U. campuses, which serve nearly 460,000 students.

The tentative deal means that faculty at the nation’s largest four-year public university system will return to work on Tuesday, union officials said.

“This historic agreement was won because of members’ solidarity, collective action, bravery and love for each other and our students,” said Antonio Gallo, associate vice president of lecturers for the state’s southern region, in a statement. “This deal immensely improves working conditions for faculty and strengthens learning conditions for students.”

Union leaders said that wages had not kept up with the high cost of living in California. The deal would immediately increase salaries for all faculty by 5 percent retroactively to July 1, 2023, with another 5 percent raise slated for July 1, 2024, according to union officials.

It would also immediately raise the salary floor for the lowest-paid faculty members by $3,000 and increase parental leave to 10 weeks from six.

“I am extremely pleased and deeply appreciative that we have reached common ground with C.F.A. that will end the strike immediately,” Mildred García, the California State University chancellor, said in a statement on Monday night. “The agreement enables the C.S.U. to fairly compensate its valued, world-class faculty while protecting the university system’s long-term financial sustainability.”

The C.S.U. strike was the latest in a series of large-scale labor actions nationwide involving workers across industries that are grappling with wages that have not kept pace with high inflation. Hollywood writers and actors and members of the United Automobile Workers launched major strikes last year.

Education strikes have also been on the rise in recent years, particularly in California. Los Angeles school employees staged a walkout last March, and Oakland educators went on strike for nearly two weeks in May. In December 2022, graduate student workers and researchers at the University of California system, the state’s other four-year university system, stopped working for nearly six weeks to protest low wages.

It is rarer for university faculty to go on strike, though 9,000 full-time faculty members, graduate workers, postdoctoral associates and counselors at Rutgers University did so last April. Ken Jacobs, co-chair of the Center for Labor Research and Education at the University of California, Berkeley, said the growing unrest among faculty in part reflected universities’ increased reliance on part-time instructors and others who have very low starting pay.

In an interview on Monday night, Ray Buyco, a senior lecturer in the history department at San Jose State University, one of the biggest C.S.U. campuses, noted that the union didn’t achieve its goal of 12 percent raises for all faculty. But he said he was proud that under the deal, the minimum salary for C.S.U. faculty — currently $54,360 — would increase by $3,000 immediately, and then again by $3,000 on July 1.

“This is a real big win for the lowest paid among us,” said Mr. Buyco, who holds multiple jobs to afford living in Silicon Valley. “For a lot of people, it’s really going to affect their lives in a good way.”

C.S.U. leaders and the faculty association had been negotiating since May. Union members will vote in the coming weeks on whether to approve the contract.