BOSTON — Massachusetts will offer tuition rebates to full-time, qualifying students who begin their studies at a community college and go on to earn a bachelor's degree at a state university.

Republican Gov. Charlie Baker and state higher educational officials on Thursday unveiled what they called a first-in-the-nation program at Middlesex Community College in Lowell, one of the state's 15 community colleges. The initiative, dubbed Commonwealth Commitment, would be phased in over two academic years, starting in September.

Students from any community college who enroll in one of two dozen fields of study would receive a 10 percent rebate on tuition and fees upon successful completion of each semester, provided they maintained a cumulative grade point average of 3.0 or higher.

To continue in the program, students must earn an associate's degree from the community college in 2½ years or less, and complete their bachelor's degree at a state university, including any University of Massachusetts campus, in no more than 4½ years total.

"Even though public higher education in Massachusetts is already a great value, the Commonwealth Commitment will make it even easier for students to go to school full-time and to enter the workforce faster and with less debt," Baker said in a statement.

Along with the rebates, tuition and fees for participating students would remain frozen at the level at which the students started participation in the program and remain at that level for the duration of their studies.

The average Commonwealth Commitment participant, who must be a Massachusetts resident, would be estimated to save more than $5,000 on the cost of a four-year degree. But because the state has no solid guess of how many students might sign up, there is no estimate of what the program might cost the state in lost tuition and fees.

Beyond saving students money, higher education officials say it is also intended to prod more young people into completing school faster and getting into the workforce sooner. Many Massachusetts employers, they say, are facing a shortage of qualified college graduates to choose from.

People who attend school part-time while working would not be eligible for Commonwealth Commitment because they would be unlikely to complete their degrees within the 4½ year time frame. Officials say it would also be difficult — though not impossible — for students to switch majors and remain in the program because extra courses might be required.

The 24 available majors would not include engineering or nursing, because officials say they are in greater demand and more expensive for universities to run.

"It was not easy or simple to hammer out an agreement among 28 undergraduate institutions with different missions and programs, but I was extremely proud to see how presidents, provosts, faculty and staff worked together with a sense of common purpose to get this done," said Carlos Santiago, the state's commissioner of higher education.