Bangladesh captain Mashrafe Mortaza said his side were lucky to still have a chance at winning the three-match ODI series, after two close matches against Afghanistan. Bangladesh won the first ODI by seven runs, and lost the second match on Wednesday by two wickets as Afghanistan aced a tense chase of 209.

"We simply played very bad cricket in the two matches," Mashrafe said, in a flat response when asked what had gone wrong with the side. "We luckily won the first match or else we would have lost the series by now. We are very lucky that we still have a chance to win this series. Maybe if we can learn from our mistakes, we can win the series."

The home side have faced a few problems in their first ODI series since November 2015. In the second match, their top four batsmen all got starts but none of them scored more than 38. The middle order imploded against Afghanistan's spinners and the bowlers faded when the opposition batsmen applied themselves. Mashrafe was disappointed Bangladesh had not managed to get a score of around 230-240.

"Our top four scored more than 20 but got out before they could cross 38," Mashrafe said. "The wicket was good for 230-240 but unfortunately we got out after getting set. In ODIs one can't get out after getting set.

"Although we bowled well and put a good effort, maybe we could have attacked more and perhaps restricted the runs. You can't just blame one department. You have to blame the team."

Mashrafe also defended Mushfiqur Rahim, who missed a couple of chances behind the stumps during Afghanistan's chase. Mushfiqur missed an edge from Najibullah Zadran off Mashrafe's bowling, two balls after Bangladesh had broken the 107-run partnership between Asghar Stanikzai and Mohammad Nabi. Then, in the 47th over, Mushfiqur missed an easy stumping chance off debutant Mosaddek Hossain with Afghanistan needing another 13 runs. Najibullah was the beneficiary again, and was at least a foot outside the crease when Mushfiqur fluffed the opportunity.

"Actually if you keep blaming him for this match it will become difficult. Maybe we probably lost a chance with the stumping but this happens in cricket," he said. "I have never seen that he has a problem mentally with keeping or cricket in general. I don't think you should only blame him.

"He has taken better catches than this in tough situations. I don't think we lost the game after that missed stumping. I think we should have done better beforehand," he said.

Mosaddek's performance was the only bright spot for Bangladesh. On his ODI debut, the 20-year-old allrounder showed the temperament to bat with the tail-enders during the 43-run tenth-wicket partnership with Rubel Hossain and was unlucky not to get a fifty. His offspin gave Bangladesh two breakthroughs.

"When I brought him into the bowling attack, obviously I thought of bringing [Mahmudullah] Riyad first, but then I thought Mosaddek did well with the bat so he must be confident," Mashrafe said. "I think he did a lot better as a bowler than what I had seen of him before.

"He had an outstanding innings with the bat. If the others could have helped him a bit then we could have won this match."

Mohammad Isam is ESPNcricinfo's Bangladesh correspondent. @isam84