Plays a role in pre-mRNA splicing as a core component of the spliceosomal U1, U2, U4 and U5 small nuclear ribonucleoproteins (snRNPs), the building blocks of the spliceosome (PubMed:11991638, PubMed:18984161, PubMed:19325628, PubMed:23333303, PubMed:25555158, PubMed:26912367, PubMed:28076346, PubMed:28502770, PubMed:28781166, PubMed:32494006). Component of both the pre-catalytic spliceosome B complex and activated spliceosome C complexes (PubMed:11991638, PubMed:28076346, PubMed:28502770, PubMed:28781166). As a component of the minor spliceosome, involved in the splicing of U12-type introns in pre-mRNAs (PubMed:15146077). {ECO:0000269|PubMed:11991638, ECO:0000269|PubMed:15146077, ECO:0000269|PubMed:18984161, ECO:0000269|PubMed:19325628, ECO:0000269|PubMed:23333303, ECO:0000269|PubMed:25555158, ECO:0000269|PubMed:26912367, ECO:0000269|PubMed:28076346, ECO:0000269|PubMed:28502770, ECO:0000269|PubMed:28781166, ECO:0000269|PubMed:32494006}. This is the function of SNRPD2 (small nuclear ribonucleoprotein D2 polypeptide, ENSG00000125743).