Complex sentence: From here he shifted to the post of Secretary in the Political and Secret Department until 1910 when, on the retirement of Sir Arthur Godley, Ritchie himself became the Permanent Under-Secretary of State, a position he continued to hold until his death.
Split into simpler sentences: From here he shifted to the post of Secretary in the Political and Secret Department. Knighted in 1907, on the retirement of Sir Arthur Godley in 1910 Ritchie became the Permanent Under-Secretary of State, a position he continued to hold until his death.