A man has tried to abduct a 12-year-old girl after she stepped off a tram in Melbourne's north-west.

The girl was travelling on the number 82 tram in Maribyrnong on Wednesday afternoon when she noticed a man staring at her.

She got off the tram at the intersection of Edgewater Boulevard and Gordon Street about 4.30pm and the man followed her.

He followed her for nearly 600 metres, before catching up to her, grabbing her arm and saying "let's go".