The Portuguese and Spanish governments have agreed to open the first direct Lisbon-Madrid train line with a high-speed service to start by 2034, officials said Thursday.