Cody McDonald scored in the sixth minute of injury time to fire ten man Gillingham to a 3-2 win over Leyton Orient.

The visitors conceded an early penalty but avoided falling behind when Adam Legzdins comfortably saved a dire effort from Danny Kedwell.

After a goalless first half, the O’s struck the first significant blow when they won a penalty and Gianvito Plasmati confidently converted his first goal for the club.

But Orient’s lead only lasted a few minutes as Leon Legge looped a header into the net for Gillingham’s equaliser.

Legge headed home his second goal of the game in the 74th minute to give the Gills the lead but Michael Doughty was then sent off for a second yellow card.

But Mauro Milanese's side snatched a goal deep into injury time through Dagnall's dramatic header.

However the final drama was still to come as McDonald hooked the ball in to stun Orient at the death. 

The O’s handed a debut to former Liverpool defender Andrea Dossena at left-back while Scott Cuthbert returned after being rested against Northampton Town.

Romain Vincelot made a welcome return in midfield after recovering from a minor knee operation and Plasmati was picked in attack after missing the last two games.

David Mooney was also fit to be named on the bench after being out since September with an ankle injury.

The O’s conceded a penalty in the opening minutes when Scott Cuthbert fouled Brennan Dickenson but Kedwell wasted the opportunity as his tame effort was easily saved by Legzdins.

Gillingham tried to put this disappointment behind them and went close through Doughty but his effort went just over Legzdins’ bar.

The O’s were largely ineffective in the opening 25 minutes and could only muster a sliced volley by Josh Wright which flew well wide.

Orient finally produced a shot on target through Dean Cox but the winger’s low strike was comfortably saved by Stuart Nelson.

Midfielder Wright had another opportunity to hit the target but he blasted his strike well wide.

Jay Simpson picked up an injury before the break and was replaced by Mooney as he came on for his first appearance since the defeat to Rochdale in September.

Cox had a chance at the back post but could not quite steer his effort on target as the O’s showed signs of improvement.

Orient were awarded a penalty of their own at the start of the second half when Adam Chicksen fouled Wright. Plasmati stepped up and the huge Italian kept his composure to drill his shot into the bottom corner.

The O’s had the chance to double their lead but Dossena’s cross just evaded the desperate lunge of Plasmati.

But Gillingham grabbed a quick equaliser when Legge’s header looped over Legzdins into the net.

Orient made a second substitution as Dagnall was thrown on in place of goalscorer Plasmati.

Gillingham replacement McDonald went close immediately after coming on as he flashed a low strike inches wide of the target.

The O’s had the chance to regain the lead after an almighty goalmouth scramble but the hosts somehow survived.

Orient were forced into a final change when Shane Lowry hobbled off the pitch and was replaced by Mathieu Baudry.

Gillingham grabbed the lead for the first time when Legge planted another header home past a static Orient defence.

But the hosts were reduced to ten men when Doughty was shown a second yellow card for time wasting.

There were five minutes of injury time and Orient nearly equalised but Dagnall's header was well saved by Nelson. 

But Dagnall headed home deep into stoppage time for the O's. However Gillingham responded and with the last kick of the game McDonald netted to leave the O's broken and in the bottom four.

Gillingham: Nelson; Chicksen, Egan, Legge, Hoyte; Dickenson, Loft, Hessenthaler, Doughty, McGlashan (Dack, 62); Kedwell (McDonald, 62)

Subs not used: Fish, Morris, German, Linganzi, Norris

Leyton Orient: Legzdins; Dossena, Clarke, Lowry (Baudry, 69), Cuthbert; Cox, Wright, Vincelot, Pritchard; Simpson (Mooney, 39), Plasmati (Dagnall, 61)

Subs not used: Omozusi, Sawyer, Batt, Woods

Referee: Darren Deadman

Attendance: 5,891 (809 Orient fans)