It rises in the Mantiqueira Mountains in the state of Minas Gerais and descends inland, west-northwestward. Its lower course marks a portion of the Minas Gerais-São Paulo border. At the Mato Grosso do Sul state border, after a course of 1,090 km (677 mi),[3] it joins the Paranaíba River to form the Upper Paraná River.