NIM70050 | Class 2 National Insurance contributions: general information: residency conditions
From HM Revenue & Customs · National Insurance Manual
Regulation 145(1)(d) of the Social Security (Contributions) Regulations 2001 (SI 2001 No. 1004)
The residency conditions for Class 2 National Insurance contributions (NICs) are:
the person is ordinarily resident in the UK; or
if not ordinarily resident in the UK, that before the period in respect of which any Class 2 NICs are to be paid or treated as paid, the person has been resident in the UK for a period of at least 26 out of the immediately preceding 52 contribution weeks
These rules are subject to:
European Union legislation;
Reciprocal Agreements about social security matters between the UK and other countries; and
Double Contribution Conventions between the UK and other countries
See NIM33000 onwards.