Ottawa confirms it has ratified a foreign investment treaty with China, more than two years after the controversial agreement was signed, as CBC News first reported Friday.

The controversial Canada-China Foreign Investment Promotion and Protection Agreement (FIPA) will come into force on Oct. 1, said International Trade Minister Ed Fast in a news release Friday afternoon.

“Investment agreements provide the protection and the confidence Canadian investors need to expand, grow and succeed abroad.

"We remain committed to opening new markets around the world for Canadian companies, including in the fast-growing Asia-Pacific region. This FIPA will create jobs and economic opportunities for Canadians in every region of the country," said Fast.

The agreement with China, signed in 2012, provides a framework of legal obligations and rights that would enhance foreign investment.

During a February 2012 visit to China, Harper said he "absolutely" expected that it will make a "practical difference."

China ratified the deal quickly, but the Harper government did not.

The deal has also faced opposition from the NDP, as well as a First Nations group who challenged the agreement in court.

The NDP issued a statement saying "the agreement will give China’s state-controlled companies the same protection under the law as private Canadian companies.

"In effect, it will give China access to, and control over, some of Canada’s natural resources for the next 31 years."

NDP trade critic Don Davies put forward a motion in the House of Commons in April 22, 2013, calling on the government not to ratify the agreement. The motion was defeated.

Green Party Leader Elizabeth May in a statement on Wednesday said the FIPA with China was a "sell out."

Deputy Green Party Leader Bruce Hyer added cabinet is, "signing of this deal behind closed doors, instead of giving Parliament a say, is not just undemocratic in itself … it is also a profound attack of Canada's sovereignty as a nation, and an erosion of the rights of all Canadians to make democratic decisions about our economy, environment, and energy."

Canada's trade relationship has cooled given the Harper government's delay in ratifying the deal and rules restricting state-owned enterprises from buying up companies in the oil patch.

There was also a growing divide around the cabinet table, between those suspicious of allegations of China's cyberspying, and those who want to increase trade with the Asian country.

The decision to ratify the long-delayed agreement comes just a few months before the prime minister leaves for his third visit to China.

The prime minister will be back in Beijing in November for the APEC summit.

China has been urging Canada to ratify FIPA, and this would likely have been a contentious issue during that trip if the Harper government still had not acted.

Canada has similar agreements with dozens of other countries. It clarifies rules for companies investing in either country.