Border Gateway Protocol (BGP) is an exterior gateway routing protocol. BGP is used to find routes that span multiple autonomous systems (AS). BGP is called a path vector protocol. Its main function is to identify the correct direction to route packets. This is in contrast to link-state and distance-vector protocols, which also emphasize finding low cost routes.
See RFC 4271.