Japan were on the verge of beating India before a last-over controversy erupted.