54.—(1) Section 40 (substitute road services) is amended as follows.
(2) In subsection (4) in paragraph (a) after the second “service” insert “(other than a Welsh service provided under a Welsh franchise agreement or secured to any extent by the Welsh Ministers)”.
(3) In that subsection, after paragraph (a) insert—
“(aa)in a case where that railway passenger service is a Welsh service provided under a Welsh franchise agreement (but is not a Wales-only service), the Secretary of State in relation to the service to the extent that it is not a Welsh component of a Welsh service;
(ab)in the case of a railway passenger service that is a Welsh service secured to any extent by the Welsh Ministers (but is not a Wales-only service), the Secretary of State in relation to the service to the extent that it is not so secured;”.
(4) In that subsection for paragraph (c) substitute—
“(c)in a case where that railway passenger service is a Wales-only service, the Welsh Ministers;
(d)in a case where that railway passenger service is a Welsh service provided under a Welsh franchise agreement (but is not a Wales-only service), the Welsh Ministers in relation to the service to the extent that it is a Welsh component of a Welsh service;
(e)in a case where that railway passenger service is a Welsh service secured to any extent by the Welsh Ministers, the Welsh Ministers in relation to the service to the extent that it is so secured;”.