WORCESTER — After a seven-year legal battle against the city, former police officer David F. Rawlston has won the right to wear a Worcester Police Department badge again.

It's not clear yet when Mr. Rawlston, now a state corrections officer, will return to work as a city cop.

"Prior to performing any police duties, Mr. Rawlston will undergo all evaluations, testing and training as required by Massachusetts laws and training regulations," Police Chief Gary J. Gemme said on Tuesday.

Chief Gemme had been trying to fire Mr. Rawlston since a 2007 incident in which the officer, while off duty, pointed a handgun at three teenagers in his Tory Fort Lane neighborhood.

A three-judge panel of the state Appeals Court ruled in May that a Superior Court judge was right to uphold an arbitrator who had directed the city to reinstate Mr. Rawlston.

The deadline for the city to appeal the ruling to the Supreme Judicial Court passed last month without the city taking any further steps to block the former officer's return to duty.

While the legal struggle between the city and the police union over Mr. Rawlston's termination appears to have run its course, the former officer still has an active civil lawsuit against the city in Worcester Superior Court.

The civil rights lawsuit, in which Mr. Rawlston is seeking $2 million in damages, remained pending on the court's docket as of Tuesday afternoon. A status conference that had been scheduled for last month was postponed at Mr. Rawlston's request, according to the docket.

The city wrote a check to Mr. Rawlston for $96,007 last October, according to city financial records. The former officer may be entitled to substantial back pay now that the city has dropped its opposition to his return to duty.

Mr. Rawlston didn't respond to a message seeking comment Tuesday.

City Solicitor David M. Moore and New England Police Benevolent Association Executive Director Jerry Flynn have both declined to comment on the status of settlement negotiations between the city and the union.

The city had long argued Mr. Rawlston used excessive force, pointing a loaded weapon and using the handgun to strike two of the teenagers, while confronting them in his West Side neighborhood one night in April 2007.

But the initial arbitrator questioned the version of events claimed by the three teenagers, saying they lacked credibility, and subsequent courts backed the arbitrator's ruling.

The city made a second unsuccessful effort to fire Mr. Rawlston when Chief Gemme revoked his license to carry a firearm, which the city argued made him ineligible to fulfill the duties of a police officer.

A second arbitrator then directed the city to again reinstate Mr. Rawlston, and the city's appeals of that ruling to the Superior Court and state Appeals Court went in Mr. Rawlston's favor.