An Alabama teenager whose photo went viral after he was spotted walking en route to his high school graduation in full cap and gown has been gifted a car.

The photo of Corey Patrick surfaced online last week when a passerby snapped the picture of him making his way to a bus stop in Birmingham so he could get to his graduation.

The 19-year-old's family do not own a car but he was determined not to miss the chance to accept his diploma from Tarrant High School.

Corey has spent the past year waking up at 4.30am to make the same trek to school.

Corey Patrick, an Alabama teenager whose photo went viral after he was spotted walking en route to his high school graduation in full cap and gown, has been gifted a car

His family relocated just before his senior year to the West End neighborhood, which is about 10 miles from his school but takes roughly 90 minutes to reach on public transport.

Corey wanted to finish his senior year with his friends so he committed to waking up early.

'I had to do what was necessary for me to walk this year,' he told WBRC.

His mother Felicia White said the rest of his family eventually managed to find a way to get to the school in time for his graduation.

When the photo of Corey went viral on social media, local radio host Rickey Smiley asked followers to help track the teenager down.

This photo of Corey surfaced online last week when a passerby snapped the picture of him making his way to a bus stop in Birmingham so he could get to his graduation

The 19-year-old's family do not own a car but he was determined not to miss the graduation. Local radio host Rickey Smiley gifted him and his family the car on Friday

Smiley then gifted Corey and his family a brand new car on Friday in recognition of the teen's dedication and perseverance.

'He's a great young man. He's very quiet, reserved, humble and he gets a little hardheaded sometimes, but he's a very obedient child and I'm proud of Corey,' his mother said.

'Corey was getting up at 4.30 in the morning and had to be at the bus stop at 5.41 in the morning for the last year.

'Even when he would get out of school he couldn't get from that side of town until 5.19 when the bus runs back over there. So he doesn't make it back this way until about 6.30 or 7 o'clock.'