Hundreds of commuters spent close to an hour stuck on trains in the city loop due to a power fault on Monday morning.

Two inbound trains ground to halt in the Melbourne loop about 8.30am, due to an overhead power issue.

Both trains lost power, stranding commuters underground for 50 minutes.

"Only one train was faulty, but both were affected because of the overhead power issue," Metro Trains spokeswoman Larisa Tait said.

Three other trains in the city loop at the time were stopped at platforms, allowing the passengers to disembark.