LONDON (Reuters) - A man has been arrested in connection with an operation that targeted British politicians and journalists working in parliament with unsolicited and flirtatious messages, police said on Wednesday.

"A man was arrested on suspicion of harassment and committing offences under the Online Safety Act. He was taken into custody where he remains," London's Metropolitan Police (Met) said in a statement.

"The arrest relates to an investigation being carried out by the Met's Parliamentary Liaison and Investigation Team following reports of unsolicited messages sent to MPs and others. The investigation remains ongoing."

One lawmaker resigned from the governing Conservative Party in April after admitting he had he replied to the messages with intimate photos and then handed over the phone numbers of colleagues.

(Reporting by Muvija M and Alistair Smout, writing by William James; editing by Michael Holden)