O’Hara’s family came originally from county Sligo, so he may have been distantly related to Charles O’Hara*, its representative for nearly 40 years. His grandfather, another James, married the daughter of Robert Shaw (perhaps the former Galway Member of that name) in 1744 and from that time onwards the family occupied a prominent place in the offices of the corporation. An O’Hara held the position of town clerk from 1757 until at least the 1830s, and this Member’s father (b. 1748), who graduated at Trinity, Dublin in 1768 and was called to the Irish bar in 1771, was its recorder, 1772-3, and again from 1774.
At the general election of 1826, when a contest was expected between Daly’s nominee and a candidate to be put up by the powerful independent interest, O’Hara emerged as a last minute compromise, his unexceptionable character and good legal stewardship making him acceptable to all parties. He staked his claim to being unattached, distancing himself from the dominant interest by promising to open the corporation, and defeated an ostensible challenger in a fierce contest; it was soon suspected, however, that his loyalties secretly lay with Daly, who had been anxious to neutralize a potential challenge to his authority in the borough in order to safeguard his county seat.
Although he had been attacked for being too close to Daly and declining to contribute to the national subscription to Daniel O’Connell* that year, he was warmly applauded for supporting the legislative campaign for enfranchising the borough’s Catholic tradesmen at a meeting in Galway, 30 Aug., and for stating that he would honour his election pledges at another, 25 Oct. 1829.
Having secured the passage of the Galway docks bill, if not of the franchise measure (which was defeated in the Lords), he offered again on the basis of his record at the general election of 1830, when he denied the allegations of his opponent, the former Member Valentine Blake†, that he was a creature of the corporation and declared in favour of limited parliamentary reform.
It was initially believed that he would persist at the ensuing general election, or, if not, that his kinsman John, the town clerk, would offer in his place. However, boasting that the independence of the town had been secured, he gratefully retired back into private life, leaving the seat free for an advanced reformer.
