Introduction

Despite the worldwide concern about climate and sustainability, Pakistani small and medium-sized enterprises (SMEs) face significant issues (i.e., inadequate resources, outdated technologies, and weak infrastructure) in improving environmental performance (EP) (Soomro et al. 2024). Lin et al. (2024) claim that these issues often restrict SMEs’ abilities to work for eco-friendly operations in their daily routine. Furthermore, SMEs face difficulties including inefficient energy utilization and waste management, which decreases EP (Zhang et al. 2022). The performance of SMEs suffers due to a lack of awareness of the United Nations’ (2021) Sustainable Development Goals (SDGs). To mitigate these problems, artificial intelligence (AI), i.e., automated monitoring systems and predictive analytics, is an efficient technology that enables SMEs to bring efficiencies while decreasing energy consumption and waste. It also tracks the performance in the form of the environmental impact (Li et al. 2020). AI helps SMEs to align with their operations and use SDGs that can reduce carbon emissions. AI associated with the external environmental components increases the EP of SMEs (Khan et al. 2021). Regulatory authorities and strategic initiatives are also required to ensure that SMEs use AI for SDG goals (Shaik et al. 2024). Combining AI with the external environment variables increases EP but also ensures long-term compliance with the SDGs.

Previous research (Benzidia et al. 2021; Lin et al. 2024; Khalid et al. 2024; Naeem et al. 2025) investigated the relationship between AI and financial success but did not look at how AI influences the EP in developing economies and SMEs. Furthermore, earlier research ignored the mediating role of external environmental elements. These links are crucial in determining how much AI adoption converts into meaningful ecological advantages, as they give a framework for operational alignment and compliance with sustainability objectives (Ghobakhloo et al. 2023).

To fill this gap, our research intends to answer two essential questions: Does AI improve SMEs’ EP in Pakistan? Also, do external environmental factors mediate the relationship between AI and EP? This study contributes to the literature and provides practical implications to policymakers of SMEs in emerging economies.

This study is conducted in Pakistan because this country is in an emerging phase and is also under pressure to bring together industrial expansion and environmental sustainability (Anser et al. 2024). SMEs are the backbone of the country’s economy because this sector significantly provides employment and contributes to the GDP (Naeem et al. 2024). However, SMEs have old techniques and less technology; due to this, they play a significant role in environmental degradation. As a result, this country is relevant for this study because the Pakistani government’s emphasis on sustainability with global regulatory demands (Sustainable Development Goals of the United Nations, 2021) provides a unique opportunity to investigate how green AI with external environmental factors assists SMEs in aligning their operations with environmental goals.

Dynamic capacity theory (DCT) is used in this study, which emphasizes an SME’s ability to adapt to changing contexts by using resources and capabilities. AI is a dynamic capability that allows businesses to detect environmental challenges, capitalize on technological opportunities, and alter their processes for improved EP in contexts of SMEs. Furthermore, external environmental factors serve as pivotal components that help SMEs increase AI’s role in promoting flexibility and compliance with sustainability goals. This theory emphasizes AI as well as external factors in generating better environmental results.

A quantitative research approach is used in this study to investigate the impact of AI on EP in Pakistani SMEs, with the mediating role of external environmental factors. Primary data is collected through structured questionnaires from employees of SMEs. 415 questionnaires were distributed through a convenience sampling technique, and 387 complete responses were received, with a response rate of 93.2%. A deductive research approach with a positive research philosophy was used in this study. The data was analyzed using Smart PLS 4.0.9 software, which included Partial Least Squares Structural Equation Modeling (PLS-SEM). The PLS-SEM technique was used because of its capacity to handle complex models with accurate findings.

This study contributes to the existing literature in a number of ways. First, it adds to the current knowledge about the influence of AI on EP in Pakistani SMEs. Second, this is the first research to examine the influence of external variables on EP. Third, this study contributes to the literature by examining the influence of AI on external environmental elements to improve the skills of SMEs.

Fourth, this is the pioneer study that investigates the mediating role of external environmental factors between AI and EP in the context of Pakistani SMEs. Fifth, this work contributes to the body of knowledge by employing DCT in the relationship of these variables. The study has both practical and social ramifications for stakeholders. Practically, SMEs should improve their usage of AI technology to align with external environmental concerns and improve sustainability (EP). Socially, this study emphasizes the significance of sustainable development goals for SMEs to encourage eco-friendly activities and reduce environmental risks. This paper outlines how SMEs may become more sustainable and resilient by combining technology (AI), external environmental variables, and strategic flexibility.

The article is arranged as follows: Section “Introduction” consists of the introduction, Section “Theoretical Framework” presents the theoretical framework, Section “Hypotheses Development” contains the hypotheses development, Section “Methodology” presents the research methodology, Section “Results” provides the results, Section “Discussion of Results” consists of the discussion of the results, and last section “Conclusion” contains the conclusion of the study.

Theoretical framework

Prior studies (Benzidia et al. 2021; Lin et al. 2024; Javed et al. 2024a) used different theories, i.e. resource-based view (RBV), innovation theory, and institutional theory, to investigate the relationship between AI and EP to investigate the elements that allow businesses to enhance their sustainability result. These theories highlight the importance of resources, technological capabilities, and external pressures in enhancing EP. However, these theories can’t focus on the dynamic nature of organizational capacities, namely, how businesses respond to rapidly changing technology, i.e., AI and SDGs. This research used DCT as a theoretical model, which is utilized to investigate how SMEs gain the ability to adapt, innovate, and integrate assets in improving the environment. This theory tells of the ability of the business to get the opportunities and transform the opportunities into the achievement of the SDGs goals (Reis et al. 2020). According to this theory, AI functions as an adaptive instrument to help SMEs make better use of their assets while decreasing environmental effects, leading to increased EP. The model shows how external environmental factors influence organizational capability to use AI solutions for enhancing EP as a mediator. The implementation of green AI leads SMEs to boost their abilities, which results in improved performance according to the DCT model. DCT model emphasizes that through green AI, SMEs can enhance their capabilities, which ultimately increases their performance. This research using DCT gives a comprehensive model to investigate the nexus of AI, its external environmental factors, and EP in SMEs. This model shows how AI is important in creating a sustainable business in the changing external pressures.

Hypotheses development

Artificial intelligence and environmental performance

According to Naeem et al. (2024), AI is contrary to human intelligence. It is processed by the computers and involves the roles, i.e., reasoning, problem-solving, learning, and decision-making. All over the world, businesses are rapidly implementing AI technologies like predictive analytics, machine learning, and automation to improve efficiency and boost sustainability initiatives (Chowdhury, 2024). AI contains two types, i.e., green and red AI. The Green AI is energy efficient, while the red AI uses more energy. Pakistan’s government is thinking more about implementing environmental practices (Soomro et al. 2025). So in Pakistan, SMEs use green AI to increase their efficiency. EP is the ability of the business to manage and reduce its environmental problems, like energy consumption, waste management, and carbon emissions (Song et al. 2018). Previous studies (Teece et al. 1997; Li et al. 2020; Schaefer 2023; Rashid et al. 2025) have indicated that AI is a pivotal technology in increasing the EP. It helps the SMEs to make better decisions about resource utilization, energy efficiency, and waste reduction. According to Bibri et al. (2024), AI helps businesses with environmental challenges by providing affordable and measurable solutions that streamline processes and integrate with SDGs. Javed et al. (2024b), Javed et al. (2025), and Basit et al. (2024a) claimed that environmentally friendly technology increases business performance. However, previous research (Li et al. 2020; Schaefer, 2023; Rashid et al. 2025) focused on larger firms in developed countries. The above studies left a research gap in the nexus of AI and EP for SMEs in developing countries.

The study aims to fill this gap in the literature by determining the impact of AI on the EP in terms of SMEs. Furthermore, this research utilized the DCT theory, which is relevant to the SMEs in evolving economies. This theory helps businesses with AI, which can innovate and restructure resources to reduce environmental issues. Based on the literature, the following hypothesis was formulated

H1: Artificial Intelligence (AI) has a significant impact on the Environmental Performance (EP) in the SMEs of Pakistan.

External environment factors and environmental performance

The external environmental factors (carbon emission policies and sustainability standards) have evolved as strategic tools for improving the businesses having EP around the world (Yasir et al. 2020). According to Sikder et al. (2023), carbon emission policies encompass the efforts for businesses to minimize their carbon emissions through energy-efficient technologies, cleaning industrial processes, and carbon-efficient operations. The sustainability rules are the legal framework and policies that help enterprises implement environmentally friendly practices (like emission reduction goals, waste management, and resource conservation) (Kazancoglu et al. 2021). Prior research (Khan et al. 2021; Rashid et al. 2025; Inderwildi et al. 2020; Durrani et al. 2024) focused on the internal elements of businesses (i.e., organizational culture, leadership commitment, and technological abilities) and ignored the importance of external factors. External environmental factors are most important to protect the environment and align goals with the SDGs. So, our study focused on external environmental factors in the context of SMEs in Pakistan to fill this gap in the literature. Our research provides a thorough understanding of how external environmental factors affect EP in developing economies, where SMEs face significant challenges. Based on the above literature, the following hypothesis is formulated.

H2: External factors (carbon emission strategies and sustainability regulations) have a significant effect on Environmental Performance.

Artificial intelligence, external environment factors, and environmental performance

AI and external environmental factor integration have received the attention of researchers and policymakers in the last few years. External environmental factors consist of a lot of factors, i.e., carbon emission policies, sustainability regulations, market forces, social & stakeholder pressures, and technological advances, but this study focused on carbon emission policies and sustainability regulations because these are both the most important strengthen the relationship between AI and EP. According to Teece (2014), businesses improve their environmental sustainability initiatives through the use of AI and external environmental factors. Adelakun et al. (2024) claim that AI can assist businesses in following the SDGs guidelines to enhance their abilities. These abilities optimize carbon emission policies and align with the environmental standards of the UN SDGs. Earlier studies (Kulkov et al. 2024; Balcıoğlu et al. 2024; Basit et al. 2024b; Basit et al. 2023) have emphasized how AI-based innovations assist businesses in aligning their operations with SDGs. These integrations of AI and external environmental factors create opportunities for SMEs to improve their EP.

These factors play an important role in AI-enhanced EP, but earlier studies have ignored these factors. AI, with these factors, has a significant effect on sustainable outcomes in the form of EP. Zhu et al. (2013) claim that businesses that effectively integrate external environmental factors into their activities are more likely to achieve better environmental results. These environmental factors ensure that AI adoption is more beneficial for businesses to upgrade themselves to respond to the legal requirements of the UN. External environmental factors mediate the relationship between AI and EP. AI-based technology, with external environmental factors overcome the issues faced by SMEs in developing economies. This study fills the gap in the literature through the mediating role of external environmental factors between AI and EP. Based on the above literature, this study formulates the following hypotheses.

H3: Artificial Intelligence has a significant effect on external factors (carbon emission strategies and sustainability regulations).

H4: External factors (carbon emission strategies and sustainability regulations) mediate the relationship between artificial intelligence and environmental performance.

Conceptual framework

The conceptual framework of this study is given below in Fig. 1, which consists of the independent variable AI, mediator external factors, and dependent variable EP.

Fig. 1: A conceptual model of policy and regulatory processes that serve as mediators in the interaction between artificial intelligence and environmental performance.
figure 1

This picture depicts a conceptual framework in which Artificial Intelligence (AI) influences environmental performance via two crucial institutional mechanisms: carbon emission rules and sustainability laws. AI, as depicted on the left, creates systemic changes that influence policy and regulatory measures (middle), which in turn have an impact on the environment. Blue arrows reflect the proposed causal pathways.

Methodology

This research employed a quantitative methodology, with primary data obtained via a five-point Likert scale structured questionnaire administered to employees of SMEs across the manufacturing, textile, and pharmaceutical sectors. A deductive reasoning approach, alongside a convenience sampling technique, was implemented in this investigation. The questionnaire instrument was adapted from previous literature. The AI framework comprises four distinct elements and is adapted from the work of Bag et al. (2021), whereas the external variables (5, 5 items) were adaptive as per Chu et al. (2019). The EP was used as per the methodology given by Lin et al. (2024). A total of 415 questionnaires were distributed, resulting in the acquisition of 387 valid responses. PLS-SEM was used to investigate the relations among variables; it is well-suited for complex models (Liu et al. 2024). This model consists of two primary components: the measurement model and the relations among the variables. PLS-SEM has found wide application in disciplines like human resource management, general management, accounting, and finance (Hu et al. 2022). For these purposes, the structural analysis, Smart PLS version 4.0.9 software, was utilized.

Results

Demographic results

The data is presented in Table 1, which has 59.95% of the workforce comprised of males, while 40.05% consists of females. The findings elucidate the current distributions of the workers. Male employees’ prevalence is significantly greater than their female counterparts. Additionally, the demographic characteristics of SMEs further influence this disparity. Moreover, 19.12% of the workforce possesses a matriculation qualification, 28.16% have completed intermediate education, 32.55% hold a bachelor’s degree, and 20.15% have attained a master’s degree.

Table 1 Demographics.

Measurement of model

The measurement of the model’s outcomes is delineated in Table 2. The measurement of the model was conducted to authenticate construct validity by scrutinizing both construct reliability and validity. Construct reliability was evaluated utilizing Cronbach’s alpha in conjunction with composite reliability metrics, thereby confirming that all essential variables within the model adhered to the requisite standards. All values of Cronbach’s alpha and composite reliability surpassed the critical threshold of 0.70 (Hair et al. 2020; Basit et al. 2025). Consequently, the verification of construct reliability was established. Convergent validity was quantified by analyzing the average variance extracted (AVE) values, which exhibited a range from 0.561 to 0.642, thus exceeding the 0.50 minimum threshold as recommended by Anser et al. (2024). This indicates that the model is both reliable and valid. Discriminant validity was evaluated via the Heterotrait Monotrait (HTMT) ratio and the Fornell-Larcker criterion. The findings are detailed in Tables 3 and 4, revealing that no multicollinearity issues are present among the variables.

Table 2 Reliability and Validity Test.
Table 3 Fornell-Larcker Criterion.
Table 4 HTMT Ratios.

Hypotheses testing and discussion

Direct effect

Table 5 presents the impact of AI on SMEs’ EP and its effect on external factors, as well as the influence of these external factors on EP. Based on DCT, our study shows how AI use affects SMEs’ EP through the mediation of external factors. Initially, the study demonstrates that AI has a significant positive effect on EP (β = 0.269, p < 0.000), accepting hypothesis 1. DCT also supports these findings. DCT suggests that through AI, SMEs can enhance their capabilities to improve EP.

Table 5 Direct Effect.

Secondly, the study finds that AI significantly influences external factors (β = 0.273, p < 0.003 and β = 0.260, p < 0.005), supporting hypothesis 2. These results also align with DCT, which emphasizes the strategic part of dynamic capabilities in conforming to external changes. Unlike prior studies, which have largely overlooked the relationship between AI and external factors, our exploration highlights the significance of these factors in the environment of AI applications. In the current period, marked by climate change and environmental challenges, AI emerges as a pivotal tool for mitigating the negative environmental impacts of technology. Thirdly, the results show that external factors significantly affect EP (β = 0.259, p < 0.001 and β = 0.201, p < 0.000), thereby supporting hypothesis 3. These findings are consistent with DCT, which underscores the significance of external influences on organizational performance. While prior studies have generally concentrated on internal factors affecting EP, our study acknowledges the critical role of external factors. Policies aimed at reducing carbon emissions and enforcing sustainability measures are vital for minimizing environmental pitfalls to enterprises, enabling them to achieve financial aims and gain a competitive advantage.

Full model result

This study investigates the mediating role of external factors in the relationship between AI usage and EP. In Table 6, results indicate that the indirect effect of external factors is significant (β = 0.217, p < 0.003, and β = 0.201, p < 0.004), which supports hypothesis 4. Recent research increasingly emphasizes the importance of carbon emission policies and sustainability regulations in enhancing operational efficiency and EP for firms. However, there is limited research exploring AI as a catalyst for promoting external factors. This study sheds light on how AI usage influences EP by integrating external factors into organizational processes, underscoring the significant mediating role these factors play. The findings suggest that external factors help SMEs leverage AI to tackle internal coordination challenges related to environmental management, allowing them to standardize production and manufacturing processes to meet greener standards. This also aids in adopting digital transformation and green development strategies. Consequently, SMEs utilizing AI can effectively enhance external factors by aligning their resources and capabilities, which ultimately supports sustainable development goals.

Table 6 Full Model Result.

Hypotheses result

The summary of hypotheses is given in Table 7. The results show that all the values are present in the acceptance region, therefore, all hypotheses are accepted. An explanation of these results is given in section “Discussion of Results”.

Table 7 Hypotheses Summary.

Discussion of Results

The results indicate that AI appeared vital to EP improvement because it helps resolve resource management and waste reduction issues and boosts energy efficiency. AI solutions enable SMEs to decrease their environmental impact, which results in both better brand reputation and elevated EP levels. AI solutions give SMEs the capabilities to monitor their emissions while identifying weak areas so they can create methods to reduce their carbon output. The study outcome matches previous research findings presented by Benzidia et al. (2021) and Lin et al. (2024). The results are supported by data from the DCT model. AI promotes external factors that enhance SME abilities according to the experimental results. Better performance results from the EP while supporting the attainment of Sustainable Development Goals (SDGs).

External factors play a critical role in mediating the relationship between AI and EP. The involvement of these factors gives a strong foundation for SMEs in Pakistan to attain sustainability through integrations with AI. These factors facilitate the effective integration of AI capabilities with the environmental goals, tending to successful EP outcomes. Both AI and the external factors assist SMEs of Pakistan in increasing their reputation, therefore, the SMEs achieve improved efficiency, minimize the negative impacts of carbon emissions, streamline waste management, and boost their EP. SMEs that adopt AI-driven sustainability, combined with external environmental factors, are better enhanced to make green investments and increase their resilience to environmental challenges, thus enhancing the EP of SMEs in Pakistan. The findings were also supported by DCT.

Conclusion

This study investigates the relationship between AI and EP, highlighting the mediating effect of external environmental variables. The results indicate that AI positively influences EP by enhancing resource efficiency, decreasing emissions, and promoting decision-making focused on sustainability. Nevertheless, the impact of AI on EP is not direct; it is influenced by external environmental factors like carbon emission regulations and sustainability policies. These elements determine the adoption and implementation of AI technologies, affecting their capacity to facilitate significant environmental advancements. The research underscores that organizations aiming to improve EP via AI must strategically address external circumstances to optimize their impact.

Contribution of the study

This study contributes significantly to the existing body of knowledge in several ways. Firstly, this research validates the DCT by emphasizing how firms can implement AI to enhance EP. Secondly, by using external environmental factors as a mediator, this research expands the concept of DCT by involving AI, but alone, AI is not sufficient. On the contrary, AI’s influence on EP is dependent upon the ability of the organization to integrate AI with its strategic response to external forces. Thirdly, the empirical evidence of the mediating effect of external environmental factors fills the gap between technology-driven sustainability and external influences like market pressure, rules, and societal expectations. The above contributions signify the rising role of AI in shaping the adaptive and transformative capabilities of firms, thereby enhancing the importance of external factors in maximizing the sustainability potential of AI.

Implications of the study

Moreover, the findings of this study can help with several practical implications for technology developers, businesses, and policymakers. For businesses, integrating AI with sustainability strategies while considering external environmental factors is important. The companies must proactively involve government regulators, monitor the market trends, and invest in AI-driven activities that align with the environmental benefits to enhance improvements in EP. In terms of the policymakers, creating an environment that supports AI-driven sustainability initiatives is important. Governments can achieve this goal by implementing policies like incentives for green AI, regulations for promoting responsible AI use, and investing in the digital infrastructure to increase the role of AI in sustainability. For technology developers, designing AI solutions that are adaptable to different regulatory and market environments is the key factor. The collaborative efforts between AI innovators, businesses, and policymakers can assist AI tools in effectively addressing sustainability challenges while maintaining compliance with external constraints. With the mediating role of the organizations, external environmental factors, and policymakers can help make more informed decisions about involving AI in sustainable development.

Limitations of study

This study also has some limitations. First, it focuses on SMEs in Pakistan, limiting the findings’ generalizability to other contexts or other firms. Second, the study is based on primary data, which may not fully depict the dynamic and evolving nature of AI adoption and its impact on EP. Third, convenience sampling may induce bias by limiting the representation of the total SMEs. Future studies could overcome these limitations by using longitudinal designs, broadening the geographical regions, and investigating alternative mediators or moderators of the AI-EP relationship. These activities would help to improve the understanding of AI’s role with external environmental factors in fostering environmental sustainability in SMEs of emerging economies.