The research described in this position paper aims at addressing the emerging need for scientifically grounded guidance on how tointroduce AI in K-12 education in Finland. Although there are currently no explicit requirements to teach AI in the Finnish curriculum, digital competence, including programming, is to be integrated across the curriculum. We propose that programming can be used as a gateway for introducing AI, since both programming and AI can be viewed from a technological (using, modifying, creating) and a societal perspective (questions related to ethics, security and privacy). Also, connecting programming education to a given context, such as AI, can help organize the content into a meaningful whole and anchor it in students’ reality by considering current phenomena. The proposed research builds on a design-based methdology including close collaboration with teachers, addressing questions related to curriculum design and evaluation as well as teacher training and professional development.