WASHINGTON — On a trip to Ireland in 1998, Speaker Newt Gingrich researched his Irish roots, discussed the prospects for peace in Northern Ireland and entertained speculation about his presidential ambitions. He even donned work gloves and blue jeans to help build a home in Belfast for a good-will project.

Two of the sponsors for part of the Ireland trip were frequent partners of Mr. Gingrich: Freddie Mac and Fannie Mae — the government-backed housing industry giants that Mr. Gingrich has denounced as he fights to stay in contention against Mitt Romney in the Republican primaries.