In 1901 Deakin was elected to the first federal Parliament as MP for Ballaarat, and became Attorney-General in the ministry headed by Edmund Barton. He was active, especially in drafting bills for the Public Service, arbitration and the High Court. His second reading speech on the Immigration Restriction Bill to implement the White Australia policy was notable for its blatant racism, including arguing that it was necessary to exclude the Japanese because of their good qualities, which would place them at an advantage over European Australians. His March 1902 speech in favour of the bill establishing the High Court of Australia helped overcome significant opposition to its establishment.