FREDERICTON -- A lawyer for the New Brunswick government says the province is within its rights to cap medicare payments despite a legal challenge from the province's doctors.

Rick Williams told the Court of Queen's Bench that the province has the ability to cap the payments and has not breached an agreement with the New Brunswick Medical Society.

The medical society is challenging the government's planned $20 million cut and subsequent cap to annual medicare payments to $425 million.

The group, which represents the province's 1,600 doctors, says it violates a six-year agreement that expires at the end of March 2014.

Their lawyer, David Young, says the society wants a declaration that the agreement is enforceable.

Dr. Robert Desjardins, the medical society's president, says the doctors need the government to respect the agreement before they can negotiate their next contract.

Judge Judy Clendenning reserved her decision.