A second sitting Republican US senator, Mark Kirk of Illinois, has declared his support for gay marriage.

Kirk, who has opposed a constitutional amendment banning gay marriage, said in a post on his blog that "same-sex couples should have the right to civil marriage".

"Our time on this Earth is limited, I know that better than most," said Kirk, who suffered a stroke in January 2012. "Life comes down to who you love and who loves you back — government has no place in the middle."

Kirk went through months of rehabilitation before returning to work in Washington this January. He said in his blog post that when he went back to the Senate he promised himself he would return "with an open mind and greater respect for others."

Kirk is Illinois' ranking Republican lawmaker. His announcement brings to 50 the number of US senators – the vast majority of them Democrats – who are on record in support of gay marriage, according to Freedom to Marry, a group that supports gay marriage.

It also comes one week after the US supreme court held two days of oral arguments on the subject, and as the Illinois legislature is giving final consideration to a measure that would make Illinois the 10th state in the nation to allow same-sex marriage.

The Illinois senate voted in February to lift a state ban on same-sex marriage. The legislation also was approved by a house committee, but has yet to be called for a floor vote. Speaker of the house Michael Madigan said recently he believes supporters are a dozen votes short of what they need for the bill to pass.

Governor Pat Quinn, a Chicago Democrat, has said he would sign the measure.

Kirk's announcement could give political cover to Republicans in the Illinois House who are considering a yes vote but are fearful of a backlash – or a primary challenge – from social conservatives.

"Senator Kirk's support should help Illinois house Republicans in particular understand why their support of the measure is the right thing to do," said Bernard Cherkasov, CEO of Equality Illinois.

Senator Rob Portman of Ohio last month became the first Republican senator to announce his support for gay marriage in states that choose to allow such unions, and GOP senator Lisa Murkowski of Alaska says her position is "evolving".

Democratic senator Tom Carper of Delaware also announced his support for gay marriage Tuesday, saying on his Facebook page he came to his decision "after a great deal of soul searching". Carper had been one of a dwindling number of Democratic senators who oppose same-sex marriage and are under pressure from liberal groups to change their minds.

Other high-profile Republicans also have recently come out in support of gay marriage, as have a parade of Democrats. The shift reflects growing public support for gay marriage – and politicians' efforts to stay in sync with those they represent.

When Gallup first asked in polls about gay marriages, in 1996, just 27% felt they should be valid. Now 50 percent of Americans believe same-sex marriages should be recognized by law, with the same rights as traditional marriages, according to Gallup.

There are sharp partisan differences on the issue, however, making it a particularly tricky matter for Republicans. Almost two-thirds of Democrats support legalizing gay marriage, compared with 57% of independents and 22% of Republicans, according to Gallup.