COLOMBO (AFP) - Usman Khawaja hit an impressive century ahead of a three-Test series against Sri Lanka as Australia gained the upper hand in a warm-up match on Friday. The Pakistan-born batsman made 101 before retiring as the tourists reached 311-5 in their first innings in reply to a Sri Lanka Board XI's 258 at stumps on the penultimate day of the three-day game. Opener Phillip Hughes (76) and skipper Michael Clarke (61 not out) also gained valuable batting practice ahead of the series, starting in Galle next Wednesday. The remaining two matches will be played in Pallekele (September 8-12) and Colombo (Sept 16-20). Australia, resuming at 26 for no loss, denied the hosts success for more than a session as Khawaja and Hughes put on 153 runs for the opening wicket. Hughes fell in the second session when he was bowled by part-time spinner Tharanga Paranavitana after hitting 10 fours. Khawaja, who has played just one Test, then added 53 for the second wicket with Michael Hussey (28). He cracked two sixes and eight fours before retiring in the last session. Off-spinner Dilruwan Perera bagged two wickets for the hosts. Brief scores: Sri Lanka Board XI 1st innings 258 (D. Chandimal 59, T. Paranavitana 49, T. Perera 36, L. Thirimanne 32, B. Rajapaksa 21; T. Copeland 5-47, R. Harris 2-39, M. Beer 2-42, N. Lyon 1-71) Australia 1st innings 311-5 (Usman Khawaja 101 retd, P. Hughes 76, M. Clarke 61 not out, M. Hussey 28; D. Perera 2-115)