AbstractA method for modelling the prompt production of molecular states using the hadronic rescattering framework of the general-purpose Pythia event generator is introduced. Production cross sections of possible exotic hadronic molecules via hadronic rescattering at the LHC are calculated for the $$\chi _{c1}(3872)$$
χ
c
1
(
3872
)
resonance, a possible tetraquark state, as well as three possible pentaquark states, $$P_c^+(4312)$$
P
c
+
(
4312
)
, $$P_c^+(4440)$$
P
c
+
(
4440
)
, and $$P_c^+(4457)$$
P
c
+
(
4457
)
. For the $$P_c^+$$
P
c
+
states, the expected cross section from $$\Lambda _b$$
Λ
b
decays is compared to the hadronic-rescattering production. The $$\chi _{c1}(3872)$$
χ
c
1
(
3872
)
cross section is compared to the fiducial $$\chi _{c1}(3872)$$
χ
c
1
(
3872
)
cross-section measurement by LHCb and found to contribute at a level of $${\mathcal {O}({1\%})}$$
O
(
1
%
)
. Finally, the expected yields of $$\mathrm {P_c^{+}}$$
P
c
+
production from hadronic rescattering during Run 3 of LHCb are estimated. The prompt background is found to be significantly larger than the prompt $$\mathrm {P_c^{+}}$$
P
c
+
signal from hadronic rescattering.