BOSTON (CBS/AP) – Gov. Deval Patrick took the witness stand in a packed federal courthouse Friday in the corruption trial of former Massachusetts House Speaker Sal DiMasi.

WBZ NewsRadio 1030’s Lana Jones reports

READ MORE: Woman Killed After Commuter Rail Train Hits Car In Wilmington

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.

READ MORE: DA: Tyngsboro Police Tried To Stop Car Before Fatal Crash With Garbage Truck

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.”

WBZ NewsRadio 1030’s Lana Jones and WBZ-TV’s Karen Anderson contributed to this report.

MORE NEWS: Bryan Purdie Held Without Bail For Alleged Home Invasion, Kidnapping In Falmouth

(TM and © Copyright 2011 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2011 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)