BOSTON – Gov. Deval Patrick testified Friday that former Massachusetts House Speaker Salvatore DiMasi pressed him to approve a software contract that prosecutors allege was part of a DiMasi kickback scheme.

Taking the stand in the federal corruption trial of DiMasi and two associates, Patrick — the first sitting governor to testify in a criminal trial in more than 15 years — said the speaker made his interest in performance management software known to him on several occasions in the months after Patrick took office in 2007.

Prosecutors allege that DiMasi and co-defendants Richard McDonough and Richard Vitale schemed to use DiMasi’s clout as speaker to steer two state contracts to Cognos in exchange for kickbacks, with DiMasi pocketing $65,000.

The three men have pleaded not guilty.

Patrick testified that in July 2007 he and DiMasi met for breakfast at the Four Seasons Hotel in Boston to help smooth over what had been at times a rocky relationship between the two during the early days of the administration. U.S. Rep. Michael Capuano also was there to help ease the discussion.

The governor said he and DiMasi talked about priorities, including Patrick’s desire to boost the life sciences industry. DiMasi mentioned his interest in performance management software, and at the end of the meeting, Patrick recalled him saying: “Don’t forget, that contract is important to me.”

Patrick testified that DiMasi never mentioned Cognos by name in any of their discussions about the software.

The governor said he ulti mately told his staff to go ahead with the deal, if it could be done “within the rules.”

The $13 million dollar contract was awarded to Cognos in August 2007, but later rescinded when the inspector general raised questions about bidding irregularities.

After an article appeared in The Boston Globe about the investigation, Patrick said DiMasi confronted him during a meeting in the speaker’s office.

“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 testified.

During cross examination, DiMasi’s attorney, William Cintolo, showed that Cognos was one of the many companies and individuals that contributed to a committee that was raising funds for Patrick’s first inauguration in January 2007. When Cintolo asked him if the contract was awarded to Cognos in part because it donated to the inaugural committee, Patrick replied: “Of course not.”

Neither the governor nor his administration has been accused of any wrongdoing.

The governor, a former official in the U.S. Justice Department, seemed mostly at ease during the roughly 70 minutes he spent on the stand in U.S. District Court.

He entered and left the courthouse through a back entrance, and security was notably tighter than normal.

His testimony was not without its lighter moments. At one point, it was revealed that Patrick used the code name Sally Reynolds on emails he sent to his staff because he was advised not to use his own name for security reasons. He chose ‘Sally’ and ‘Reynolds’ because they were his grandparent’s names, he said.

“Now it’s a matter of public record,” the governor said, eliciting laughter in the courtroom. “Are there no secrets?”