Patrick testified that DiMasi pressed him to approve a contract for the software company Cognos that prosecutors say was part of a DiMasi kickback scheme.

WBZ-TV’s Karen Anderson reports.

On the stand Friday, Patrick said if he had known DiMasi had received referral fees for pushing Congos’ interests, he would have acted differently and would not have proceeded with the deal.

Patrick said at the very least he would have sought the advice from the state Ethics Commission.

The governor later cancelled the contract with Cognos as allegations of kickbacks emerged.

Patrick also testified that after the Boston Globe reported in 2008 that the state Inspector General’s office was investigating the Cognos contract, an angry DiMasi confronted him and accused the governor’s staff of leaking the story to the newspaper.

“He was angry and upset about the article and he believed our staff had leaked information to the Globe about the inspector general’s review,” Patrick said in court.

Patrick testified that DiMasi demanded the administration issue a statement saying that DiMasi did not wield his influence in the Cognos deal.

The governor told the jury he refused to issue such a statement because he said “that wouldn’t be accurate.”

He finished his testimony shortly before 1 p.m.

Patrick is the first governor in 16 years to testify in a criminal trial. Back then, Gov. William Weld testified at the corruption trial of supporter and former State Sen. Henri Rauschenbach who was acquitted.

Patrick spoke with reporters at the State House Friday afternoon following his testimony.

He said, “I answered the questions truthfully and to the best best of my ability and did my duty.” He said he never expected that he would testify at a corruption trial. “I find the whole affair really sad.”

When asked about frustration with corruption on Beacon Hill, Patrick responded, “It was our team who ultimately concluded we needed a fresh set of eyes if we are going to do this, and that’s why we refered it to the Inspector General.”