A teenager has been arrested in connection with an alleged attack on a police officer in Edinburgh.

Police Scotland said on Friday an 18-year-old man had been arrested by officers in connection with the attack, which they are treating as attempted murder.

Earlier in the week, the force revealed they had launched an investigation after a black Audi A1 was allegedly driven into a police motorcycle injuring the officer riding it.

READ MORE: Inquiry into deaths of pair who crashed off M9 without being found postponed

The alleged attack on the officer, which police said happened on January 11 in Bathfield, Leith, came just two days after the force said it had tried to stop the Audi in Ravenswood Avenue in connection with a suspected traffic offence.

But as officers tried to engage with the driver, the car sped off in the direction of Walter Scott Avenue.

Earlier in the week, Sir Iain Livingstone, Police Scotland’s chief constable, said any attack on an officer would be thoroughly investigated.

“Police officers come to work to serve the public, to do the right thing and to keep people safe, and any attack on a police officer, any attack on anybody who is serving the public, is utterly unacceptable, outrageous,” he said on Wednesday.

“We will investigate them thoroughly, we will bring offenders to justice and hold them to account.

“The safety of officers and staff, the safety of people who serve the public, is of paramount importance.”