After appointment as Parliamentary Secretary to the Board of Trade in 1902, he lost his seat in the 1906 General Election but returned as MP for Dulwich at a by-election later in the year and joined the Shadow Cabinet.
In 1911, he became MP for Bootle and was made a Privy Counsellor while the resignation of Arthur Balfour as leader of the Unionist party led to a stalemate between rival contenders. Bonar Law was elected leader as a compromise candidate. In the First World War he was a member of Lloyd George’s coalition War Cabinet, serving as Chancellor of the Exchequer and Leader of the House of Commons.
The coalition government was re-elected in 1918, Bonar Law returning to a Glasgow seat (Glasgow Central). He continued as Leader of the Commons but resigned from this post and as Conservative leader due to ill health in 1921. Mounting problems at home and abroad led to the end of the coalition and the resignation of Lloyd George, allowing Bonar Law to return as PM and Conservative leader in 1922, leading his party to win the ensuing election.
Ill-health forced his resignation in May 1923 and he died later that year ��" the only British Prime Minister not born in the UK, and the shortest serving one (209 days) of the twentieth century.