Liverpool have signed Fabio Carvalho from Fulham with the forward set to officially join on 1 July.
The 19-year-old played a key role in the Cottagers' promotion to the Premier League, scoring 10 goals and providing eight assists.
The clubs agreed a fee for a move in January but the deal collapsed on deadline day.
Carvalho signs a five-year deal for a fee of £5m, with a further £2.7m in add-ons.
Fulham also have a 20% sell-on clause.
Carvalho played for England at youth level but made his Portugal Under-21 debut in March.
He came through the Fulham academy and was nominated for EFL Young Player of the Season, which was won by Nottingham Forest's Brennan Johnson
"Fabio is a great talent and we did everything we could trying to secure him here on a longer deal so he could play in the Premier League with Fulham," said club owner Tony Khan.
"That didn't prove possible, but we were able to keep him for the remainder of the Championship-winning campaign and for that I know he will always be very fondly remembered by our fans."