Rhodri Glyn Thomas became one of Plaid Cymru's first ministers
Welsh Culture Minister Rhodri Glyn Thomas has resigned after claims he walked in to a pub holding a lit cigar.
The Plaid Cymru minister quit saying his position was not "sustainable" following an earlier gaffe when he named the wrong winner of a book prize.
Labour First Minster Rhodri Morgan praised Mr Thomas for his "hard work".
Witnesses at a pub near the Welsh assembly claim Mr Thomas was reprimanded by staff for having a lit cigar in his hand as he walked in.
Mr Thomas had already pulled out of the opening of the Sir Kyffin Williams gallery on Anglesey on Friday evening, telling colleagues he did not expect to last the evening in his post.
In his resignation letter to Mr Morgan, he wrote: "In the light of the publicity that has been following me in the last weeks I feel that my position in the government is no longer sustainable.
"Further comments would be bound to follow. It has been a privilege to be part of this government during this exceedingly exciting period."
Mr Thomas became an assembly government minister when Labour and his party formed a coalition after the assembly election a year ago.
He and two party colleagues, Ieuan Wyn Jones and Elin Jones, became the first Plaid ministers in the party's history when they joined Labour in the cabinet.
The latest incident came at the Eli Jenkins pub, which is well known to journalists, politicians and staff at the nearby Welsh assembly.
Accepting the resignation, Mr Morgan said Mr Thomas deserved recognition for taking forward the assembly's bid to legislate on the Welsh language.
He said: "I would like to thank you for your contribution as a minister over the last year both in cabinet and for the way you have managed your department."
According to BBC Wales Welsh Affairs Editor, Vaughan Roderick, one possible candidate to replace Mr Thomas as Culture Minister is Caernarfon AM Alun Ffred Jones.
"He has a background in the television industry so he would fit that portfolio," he said.
Opposition leader and Welsh Conservative AM Nick Bourne said Mr Thomas' resignation was "regrettable".
"However, the smoking ban was introduced in the interests of public health to protect people from the risk of smoking-related illnesses.
"There can be no exceptions to the rules and Rhodri Glyn Thomas would have been fully aware of that fact."
The Eli Jenkins is within yards of the Welsh assembly in Cardiff Bay
Mr Thomas' party colleagues have praised his contribution as an assembly government minister.
Plaid Cymru leader and Deputy First Minister Ieuan Wyn Jones AM said: "I have accepted Rhodri's decision to resign and I've thanked him for his important work as Heritage minister."
Adam Price, the Plaid Cymru MP for Carmarthen East and Dinefwr, said Mr Thomas' resignation did not detract from the good work he had done as a minister.
He said: "Rhodri has always been held in high regard as one of the hardest working constituency AMs and I look forward to working with him in the constituency."