SANTA FE, N.M. (AP) — A former top-ranked New Mexico lawmaker told a jury he was confronted in his state Capitol office in 2014 by a senator for interfering with the proposed sale of a state-owned building.

The sale of the building, over objections of then-House Speaker Ken Martinez, is the focus of a corruption trail in state district court against former Sen. Phil Griego.

Griego is accused of using his elected office to help collect a $50,000 real estate commission without properly disclosing his involvement. He has pleaded not guilty to charges including bribery, fraud and perjury in a trail that began last week.

Former House Speaker Ken Martinez testified Wednesday that Griego entered his office alone on April 9, 2014, and asked him, "Why did you screw up my deal?"

Martinez says he did not initially understand the question about a decision that day by a state buildings commission to delay authorization of the sale of the building in downtown Santa Fe — but he quickly deduced that Griego was representing the intended buyers. Griego would eventually earn a commission of just over $50,000.

The exchange between Martinez and Griego took place after a state buildings commission meeting postponed approval of the building's sale to the owners of an upscale inn who already were leasing the property less than a block from the Capitol.

State prosecutors allege that Griego hid his underlying financial motives for more than a year as he relentlessly pushed approval of the sale through a state-agency review, approval by the Legislature and a state buildings commission.

Martinez said Griego had the demeanor of a man caught in an emergency after questions emerged at the commission meeting about the sale price and whether there was a purchase agreement.

Griego said that "if you need a purchase agreement today we can just do that right now," Martinez testified. "It kind of boggled my mind."

Martinez said he refused to reconvene the commission meeting, even after Griego summoned a legislative attorney and deputy Cabinet secretary to Martinez's office.

The testimony from Martinez, an attorney who retired last year from the Legislature after nearly 18 years in office, provided a glimpse of backroom dealings in 2014 as the building sale neared final approval by the New Mexico Capitol Buildings Planning Commission.

Among commission members, Martinez said he alone voted against the sale at a second meeting on the matter in June 2014— not because of Griego's financial interest, but because he thought the appraised value was too low.

Martinez said it was not his place as House speaker to pose ethical questions about senators who must follow distinct Senate rules, and that he notified Senate President Mary Kay Papen of the conversation with Griego.

Contacted Wednesday, Papen said she recalled that people were gossiping about Griego's financial involvement at the time of the sale's final vetting.

She ultimately voted in favor of the sale "because it was presented to us that it was a done deal."

Griego's lead defense attorney, Thomas Clark, has highlighted testimony that the property sale was propelled by the Department of Energy, Minerals and Natural Resources with the knowledge of officials across upper echelons of state government.

Papen later participated in a Senate ethics investigation against Griego, who resigned in 2015 at the conclusion of the probe.