PROVIDENCE, R.I. — A Rhode Island state senator has apologized for yelling at a man who was testifying at a legislative hearing.

Sen. Stephen Archambault, a Smithfield Democrat, apologized on the Senate floor Tuesday, saying he was “out of line” during a Senate Judiciary Committee hearing last week.

The angry exchange happened during testimony by Terry Gorman, executive director of Rhode Islanders for Immigration Law Enforcement. Gorman was speaking against legislation that would have granted special driver’s licenses to immigrants living in the country illegally.

Gorman had paused to ask why Archambault and other senators on the committee appeared to be laughing during Gorman’s testimony. Archambault retorted that what he was saying to fellow senators was “my business” and Gorman had no standing or privilege to interrupt.