FREDERICTON - New Brunswick's natural resources minister says he is legally obligated to grant a five-year lease to Windsor Energy to explore for shale gas, even though he tried to have the company charged last year.

Bruce Northrup said Tuesday that the Calgary-based company fulfilled all of the commitments set out under a three-year licence granted by the previous government.

Under the terms of that licence, Windsor Energy spent $4.5 million on exploratory work in the province.

"At the end of the day, we're pretty well obligated to give them their lease," Northrup said.

"We did seek legal opinion on that and I didn't want to subject the people of New Brunswick to what could have been a lawsuit for the $4.5 million and also future development."

Last fall, his department alleged that Windsor Energy violated the Oil and Natural Gas Act by testing in Sussex without the consent of town council. The RCMP later said there were no grounds for charges.

The company apologized, saying it should have waited for council's approval.

Northrup, who is also the elected member for the Sussex area, said giving the company a new lease was not an easy decision for him.

"Everything happened basically in my backyard and I took offence to some of the things Windsor Energy did, but it was a learning experience for me as minister of natural resources," he said.

"It was a learning experience for our government, and it was also a learning experience for industry in general."

The new lease will allow Windsor Energy to do more testing in the Sussex, Hampton and Quispamsis areas, and drill some test wells in the search for shale gas.

In a statement, Khalid Amin, president of Windsor Energy, said he was pleased to have the five-year lease approved.

"We look forward to working with the province, minister and municipalities as we move forward in our exploration efforts to determine oil and gas reserves for the benefit of New Brunswick," Amin wrote in an email to The Canadian Press.

Dominic Cardy, leader of the province's New Democrats, called the government's approval of the lease "foolish."

"Even if they wanted to go ahead with fracking as a whole, why they would choose a company that has proven themselves to be a poster child for the people opposed to the industry in the way they behave, is beyond me," Cardy said.

Liberal Energy critic Brian Kenny says the public is opposed to shale gas exploration and the government should impose a moratorium on hydraulic fracturing until more details are known.

Hydraulic fracturing, or fracking, involves pumping water and chemicals into a gas well to fracture rock layers and release the trapped gas.

This week, the Nova Scotia government imposed a two-year hold on fracking, but Northrup said a moratorium isn't required in New Brunswick.

Northrup said he'll release new regulations for gas exploration within weeks and then seek public input.

He said the new rules won't be brought in as legislation until the fall.