Japan advanced to the quarterfinals of men's Olympic football after forward Kensuke Nagai scored an 84th-minute goal in a 1-0 win Sunday over Morocco.