Identify this bird please

Hi

I have come across this bird which recently visited my garden for a week or so.

It behaves and is the shape of a wagtail. Another pied wagtail chased it away but it came back.

It kept tapping on my window and one day sneaked in my house whilst I was putting out some feed for the birds. I caught it in my hands and the bird did not struggle at all. It just looked up at me. It was in good health. I let it go and it gave a cheery twirp and landed

on the bird table. It continued tapping on the window with its beak. I haven't seen it for a while now but it was interesting to see it.