The state ethics commission has approved a proposed exemption to the conflict of interest law that would allow state Sen. Dan Wolf to remain in office while owning part of Cape Air.

The ethics commission voted unanimously at a special Monday morning meeting to approve the exemption to the state ethics law, commission spokesman David Giannotti said. The exemption would allow state, county or municipal employees to have government contracts subject to certain conditions.

According to a draft of the exemption, the purpose is to allow public employees with business interests involving government prior to entering public service “to retain those interests, while providing safeguards to ensure that they do not use their public positions to advance their business interests.”

The exemption is subject to a public comment period before it takes effect. It comes three months after the ethics commission ruled that Mr. Wolf, a Democrat who represents the Cape and Islands, was in violation of the existing state conflict of interest law.

Mr. Wolf is co-founder and part owner of Cape Air, which flies into and out of Logan Airport. The commission ruled that this posed a conflict because Logan Airport is run by the state agency Massachusetts Port Authority, though Mr. Wolf said the contracts were noncompetitive and nonnegotiable.

The commission said Mr. Wolf had to divest of his stake in the company, end the airline’s contracts with Logan Airport or resign his seat.

Mr. Wolf contested the ruling and proposed an exemption to the law that would allow him and others with government contracts to hold public office. At a September meeting, commissioners voted to look into creating such an exemption.

The draft exemption approved Monday would allow public employees to have financial interest in a contract that predates their election under certain terms.

Pre-existing contracts would be allowed, even if negotiated or competitively bid, provided that the employee discloses the contract and does not participate in or have official responsibilities with the contracting agency.

But if a competitive or negotiated contract has to be renewed, the public employee would be subject to a different exemption.

New contracts can be entered into while someone holds public office as long as they are substantially similar to the existing contracts and are not competitively bid.

Mr. Giannotti said the proposed exemption would apply to Mr. Wolf because he is a state employee.

The exemption will not take effect immediately. Mr. Giannotti said that the statutory requirements for creating a new regulation include notifying a local government advisory committee. A public comment period will last for at least four weeks, Mr. Giannotti said, and there will be at least three public hearings, including one somewhere in southeastern Massachusetts.

The initial ethics commission ruling that found Mr. Wolf had a conflict came shortly after the two-term state senator announced his campaign for governor. He ended the campaign two weeks ago, citing uncertainty about the ethics commission ruling.“I’m feeling very happy about [the ruling],” Mr. Wolf told the Gazette by phone Monday afternoon. “I love the district that I serve and I’m really happy to continue to serve the district.”

Mr. Wolf said he was pleased that he could keep his seat and run for re-election next year.

The decision still comes too late to revive his gubernatorial campaign, he said. The exemption will be in place by mid-December at the earliest, which he said was too late to enter the campaign “for somebody who doesn’t have a state-wide presence at the moment.”

But the exemption “is a step in the right direction for folks at a municipal level up to a statewide level,” he said. He noted the exemption could have an impact at the town level, such as those who own fishing boats and want to tie them up to a town pier. With the law as it used to stand, that would be a conflict.

“I appreciate the deliberative and thoughtful nature of [the exemption],” he said.